mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
fix: 4 param error handler (#3520)
This commit is contained in:
parent
5a2184ccd0
commit
51e871da96
@ -6,7 +6,9 @@ export const catchAllErrorHandler = (
|
|||||||
logProvider: LogProvider,
|
logProvider: LogProvider,
|
||||||
): ErrorRequestHandler => {
|
): ErrorRequestHandler => {
|
||||||
const logger = logProvider('/debug-error-handler.ts');
|
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);
|
handleErrors(res, logger, err);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user