From 99587870b348afa05f0ab03d8ba6a816bfb36b24 Mon Sep 17 00:00:00 2001 From: Guido de Jong <35309288+guidojw@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:29:50 +0200 Subject: [PATCH] fix(expressLoader): use correct property for status code (#579) --- src/loaders/express.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loaders/express.ts b/src/loaders/express.ts index add31340..a548792c 100644 --- a/src/loaders/express.ts +++ b/src/loaders/express.ts @@ -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) }