-
-
Save jimdel/3a94c85d3259b70241791f40b794f3c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.use((err, req, res, next) => { | |
console.error(err) | |
console.error(err.stack) | |
res.status(err.status || 500).send(err.message || 'Internal server error: this is the bottom of the middleware error stack.') | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment