fix(errors): set correct html title for error page
This commit is contained in:
committed by
Benedikt Rötsch
parent
8d902dabcd
commit
54d1879445
1
app.js
1
app.js
@@ -142,6 +142,7 @@ app.use(function (err, request, response, next) {
|
||||
// Set locals, only providing error in development
|
||||
response.locals.error = request.app.get('env') === 'development' ? err : {}
|
||||
response.locals.error.status = err.status || 500
|
||||
response.locals.title = 'Error'
|
||||
// Render the error page
|
||||
response.status(err.status || 500)
|
||||
response.render('error')
|
||||
|
||||
Reference in New Issue
Block a user