Skip to content

Commit

Permalink
Merge pull request #44 from jkyberneees/use-error-handler-on-next
Browse files Browse the repository at this point in the history
Use error handler on next
  • Loading branch information
jkyberneees authored Jun 18, 2019
2 parents ed18f7d + d937067 commit a006570
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/middleware-chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const next = (middlewares, req, res, errorHandler) => {
const middleware = middlewares.shift()

return (err) => {
if (err) return res.send(err)
if (err) return errorHandler(err, req, res)
if (res.statusCode === 200 && !res.finished) {
if (!middleware) return

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "restana",
"version": "3.1.0",
"version": "3.1.1",
"description": "Super fast and minimalist web framework for building REST micro-services.",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit a006570

Please sign in to comment.