Revert "fix(errors): show stack trace on prod"
This reverts commit 699894b02d.
This commit is contained in:
committed by
Benedikt Rötsch
parent
67dca923e9
commit
94cadb2749
4
app.js
4
app.js
@@ -139,8 +139,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 error in locals
|
// Set locals, only providing error in development
|
||||||
response.locals.error = err
|
response.locals.error = request.app.get('env') === 'development' ? 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