Enrich fatal HLS errors in Sentry (#11359)

This commit is contained in:
Spence Pope
2026-08-05 10:15:26 -04:00
committed by GitHub
parent 17a8fe87c2
commit 32ec5330b0
4 changed files with 82 additions and 4 deletions
+6 -1
View File
@@ -4,12 +4,14 @@ import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
import {logger} from '#/logger'
import {type Metadata} from '#/logger/types'
import {ErrorScreen} from './error/ErrorScreen'
import {CenteredView} from './Views'
interface Props {
children?: ReactNode
renderError?: (error: any) => ReactNode
getErrorMetadata?: (error: Error) => Metadata
style?: StyleProp<ViewStyle>
}
@@ -29,7 +31,10 @@ export class ErrorBoundary extends Component<Props, State> {
}
public componentDidCatch(error: Error, errorInfo: ErrorInfo) {
logger.error(error, {errorInfo})
logger.error(error, {
errorInfo,
...this.props.getErrorMetadata?.(error),
})
}
public render() {