1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: 4 param error handler (#3520)

This commit is contained in:
Mateusz Kwasniewski 2023-04-14 08:59:27 +02:00 committed by GitHub
parent 5a2184ccd0
commit 51e871da96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
};
};