Skip to content

Commit

Permalink
Update docs to continue error handling on mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesir87 committed Jul 29, 2019
1 parent 5766a24 commit 627b358
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ The default behavior is to throw an error when the token is invalid, so you can
app.use(function (err, req, res, next) {
if (err.name === 'UnauthorizedError') {
res.status(401).send('invalid token...');
} else {
next(err);
}
});
```
Expand Down

0 comments on commit 627b358

Please sign in to comment.