Skip to content

Commit

Permalink
Updating route() to catch Errors thrown within a Promise
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Dec 20, 2017
1 parent e6377c9 commit 2ee4e6a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/woodland.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class Woodland {
} else {
last();
}
}).then(() => this.onfinish(req, res), err => {
}).then(() => this.onfinish(req, res)).catch(err => {
this.onerror(req, res, err);
this.onfinish(req, res);
});
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": "woodland",
"version": "4.2.0",
"version": "4.2.1",
"description": "Lightweight HTTP/HTTPS/HTTP2 router with automatic `Allow` & `CORS` headers",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 2ee4e6a

Please sign in to comment.