Send error boundary exceptions to Sentry (#2573)

zio/stable
Eric Bailey 2024-01-19 18:13:47 -06:00 committed by GitHub
parent 89607d90aa
commit 9835996d73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import React, {Component, ErrorInfo, ReactNode} from 'react'
import {ErrorScreen} from './error/ErrorScreen'
import {CenteredView} from './Views'
import {t} from '@lingui/macro'
import {logger} from '#/logger'
interface Props {
children?: ReactNode
@ -23,7 +24,7 @@ export class ErrorBoundary extends Component<Props, State> {
}
public componentDidCatch(error: Error, errorInfo: ErrorInfo) {
console.error('Uncaught error:', error, errorInfo)
logger.error(error, {errorInfo})
}
public render() {