Skip to content

Commit fce06f3

Browse files
committed
Add next(error) in returnErrorMiddleware
This makes it possible to add other custom error handlers.
1 parent 15421d3 commit fce06f3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎lib/server/error.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ const returnErrorMiddleware = (error, req, res, next) => {
3737

3838
// Set and return response
3939
res.status(statusCode).json({ statusCode, message, stack });
40+
41+
next(error);
4042
};
4143

4244
export default (app) => {

0 commit comments

Comments
 (0)