Skip to content

Commit

Permalink
fix(express): missing last param in handleErrors fnc signature makes …
Browse files Browse the repository at this point in the history
…it does not work
  • Loading branch information
phatpham9 committed Aug 25, 2020
1 parent 0f73c17 commit 69b01be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const handleErrors = (
err: MyError | HttpError,
_: Request,
res: Response,
__: NextFunction,
): void => {
errorHandler.handle(err);

Expand All @@ -43,7 +44,7 @@ const handleErrors = (

res.status((err as HttpError).code).send(err);
} catch (error) {
res.status(INTERNAL_SERVER_ERROR).send(err);
res.status(INTERNAL_SERVER_ERROR).send(error);
}
};

Expand Down

0 comments on commit 69b01be

Please sign in to comment.