Skip to content

Commit

Permalink
fix(expressLoader): use correct property for status code (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidojw authored Sep 9, 2024
1 parent 774de35 commit 9958787
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/loaders/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function init (container: Container): Application {

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

Expand Down

0 comments on commit 9958787

Please sign in to comment.