Revert "fix(errors): show stack trace on prod"

This reverts commit 699894b02d.
This commit is contained in:
Benedikt Rötsch
2018-02-07 16:45:26 +01:00
committed by Benedikt Rötsch
parent 67dca923e9
commit 94cadb2749

4
app.js
View File

@@ -139,8 +139,8 @@ app.use(function (request, response, next) {
// Error handler
app.use(function (err, request, response, next) {
// Set error in locals
response.locals.error = err
// Set locals, only providing error in development
response.locals.error = request.app.get('env') === 'development' ? err : {}
response.locals.error.status = err.status || 500
// Render the error page
response.status(err.status || 500)