diff --git a/src/lib/middleware/catch-all-error-handler.ts b/src/lib/middleware/catch-all-error-handler.ts index 3b8c18b4c5..a29538ac70 100644 --- a/src/lib/middleware/catch-all-error-handler.ts +++ b/src/lib/middleware/catch-all-error-handler.ts @@ -6,7 +6,9 @@ export const catchAllErrorHandler = ( logProvider: LogProvider, ): ErrorRequestHandler => { const logger = logProvider('/debug-error-handler.ts'); - return (err, req, res) => { + // should not remove next as express needs 4 parameters to distinguish error handler from regular handler + /* eslint-disable @typescript-eslint/no-unused-vars */ + return (err, req, res, next) => { handleErrors(res, logger, err); }; };