Skip to content

Commit

Permalink
Merge branch 'mikesir87-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jfromaniello committed Apr 20, 2022
2 parents b04cb9d + 380cdeb commit edeb965
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ The default behavior is to throw an error when the token is invalid, so you can

```javascript
app.use(function (err, req, res, next) {
if (err.name === "UnauthorizedError") {
res.status(401).send("invalid token...");
if (err.name === 'UnauthorizedError') {
res.status(401).send('invalid token...');
} else {
next(err);
}
});
```
Expand Down

0 comments on commit edeb965

Please sign in to comment.