Description
Errors that take place in the middleware does not get put into the express middleware chain. Currently the middleware will simply call res.send to send the notice to the end user.
Reproduction
Just example code without req.user property will cause plaintext "Unauthorized" to be sent to the browser.
Environment
- Version of this library used: 3.4.1