We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e6da2f commit 2610750Copy full SHA for 2610750
src/middlewares/error-handler.middleware.ts
@@ -8,7 +8,7 @@ export function errorHandlerMiddleware(
8
// eslint-disable-next-line @typescript-eslint/no-unused-vars
9
next: NextFunction,
10
): void {
11
- if (error instanceof ServerError) {
+ if (error instanceof ServerError && error.status >= 400) {
12
res.status(error.status).send(error.message);
13
return;
14
}
0 commit comments