fix(404): fix translation for missing route error
This commit is contained in:
committed by
Benedikt Rötsch
parent
beb69007ce
commit
165326bd02
2
app.js
2
app.js
@@ -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)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user