Add initial sentry setup
Related to #343 but will probably need a few more changes
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
"@redwoodjs/forms": "^0.33.0",
|
||||
"@redwoodjs/router": "^0.33.0",
|
||||
"@redwoodjs/web": "^0.33.0",
|
||||
"@sentry/browser": "^6.5.1",
|
||||
"browser-fs-access": "^0.17.2",
|
||||
"cloudinary-react": "^1.6.7",
|
||||
"controlkit": "^0.1.9",
|
||||
@@ -56,4 +57,4 @@
|
||||
"tailwindcss": "^2.1.2",
|
||||
"worker-loader": "^3.0.7"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
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
|
||||
Reference in New Issue
Block a user