Skip to content

Commit 69b01be

Browse files
committed
fix(express): missing last param in handleErrors fnc signature makes it does not work
1 parent 0f73c17 commit 69b01be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/express.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const handleErrors = (
3434
err: MyError | HttpError,
3535
_: Request,
3636
res: Response,
37+
__: NextFunction,
3738
): void => {
3839
errorHandler.handle(err);
3940

@@ -43,7 +44,7 @@ const handleErrors = (
4344

4445
res.status((err as HttpError).code).send(err);
4546
} catch (error) {
46-
res.status(INTERNAL_SERVER_ERROR).send(err);
47+
res.status(INTERNAL_SERVER_ERROR).send(error);
4748
}
4849
};
4950

0 commit comments

Comments
 (0)