We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
err.name
the returned err.name contains spaces.
app.use(expressjwt({ secret: SECRET, algorithms: ['HS256'] }).unless({ path: unlesses })) app.use((err, req, res, next) => { if (err.name. === 'TokenExpiredError') { console.log(1) } else { console.log(2) } })
if it is the above code, the log is always 2. but once you change it to err.name.trim(), everything works fine...
Please provide the following:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
the returned
err.name
contains spaces.Reproduction
if it is the above code, the log is always 2.
but once you change it to err.name.trim(), everything works fine...
Environment
The text was updated successfully, but these errors were encountered: