Skip to content

Commit

Permalink
Merge staging into main
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 9, 2024
2 parents f934590 + 9958787 commit a82d27c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/loaders/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export default function init (container: Container): Application {
})

if (typeof process.env.SENTRY_DSN !== 'undefined') {
app.use(Sentry.Handlers.errorHandler() as ErrorRequestHandler)
app.use(Sentry.Handlers.errorHandler({
shouldHandleError: (err: any) => err?.statusCode >= 400
}) as ErrorRequestHandler)
}

app.use((err: any, _req: Request, res: Response, _next: NextFunction) => {
Expand Down

0 comments on commit a82d27c

Please sign in to comment.