fix(404): fix translation for missing route error

This commit is contained in:
Benedikt Rötsch
2018-02-19 17:43:33 +01:00
committed by Benedikt Rötsch
parent beb69007ce
commit 165326bd02

2
app.js
View File

@@ -141,7 +141,7 @@ app.use('/', routes)
// Catch 404 and forward to error handler // Catch 404 and forward to error handler
app.use(function (request, response, next) { app.use(function (request, response, next) {
const err = new Error(translate('errorMessage404Route', response.currentLocale)) const err = new Error(translate('errorMessage404Route', response.locals.currentLocale.code))
err.status = 404 err.status = 404
next(err) next(err)
}) })