fix(errors): show stack trace on prod
This commit is contained in:
committed by
Benedikt Rötsch
parent
2eb85dc718
commit
699894b02d
4
app.js
4
app.js
@@ -124,8 +124,8 @@ app.use(function (request, response, next) {
|
|||||||
|
|
||||||
// Error handler
|
// Error handler
|
||||||
app.use(function (err, request, response, next) {
|
app.use(function (err, request, response, next) {
|
||||||
// Set locals, only providing error in development
|
// Set error in locals
|
||||||
response.locals.error = request.app.get('env') === 'development' ? err : {}
|
response.locals.error = err
|
||||||
response.locals.error.status = err.status || 500
|
response.locals.error.status = err.status || 500
|
||||||
// Render the error page
|
// Render the error page
|
||||||
response.status(err.status || 500)
|
response.status(err.status || 500)
|
||||||
|
|||||||
Reference in New Issue
Block a user