From 627b358d07b19d299964a5ef18a772db9b6426e2 Mon Sep 17 00:00:00 2001 From: Michael Irwin Date: Mon, 29 Jul 2019 17:42:52 -0400 Subject: [PATCH] Update docs to continue error handling on mismatch --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e8c3972e..c40c86d7 100644 --- a/README.md +++ b/README.md @@ -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); } }); ```