Files
cadhub/app/web/src/components/FatalErrorBoundary/FatalErrorBoundary.tsx
Kurt Hutten 2e91c74baf Add initial sentry setup
Related to #343 but will probably need a few more changes
2021-06-05 20:32:56 +10:00

13 lines
370 B
TypeScript

import { FatalErrorBoundary as FatalErrorBoundaryBase } from '@redwoodjs/web'
import * as Sentry from '@sentry/browser'
class FatalErrorBoundary extends FatalErrorBoundaryBase {
componentDidCatch(error, errorInfo) {
Sentry.withScope((scope) => {
scope.setExtras(errorInfo)
Sentry.captureException(error)
})
}
}
export default FatalErrorBoundary