diff --git a/src/routes/index.js b/src/routes/index.js index a59b50a5e8..bd5be4f429 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -208,12 +208,12 @@ function handleErrors(app, middleware) { return res.sendStatus(403); } - winston.error(req.path + '\n', err.stack); - if (parseInt(err.status, 10) === 302 && err.path) { return res.locals.isAPI ? res.status(302).json(err.path) : res.redirect(err.path); } + winston.error(req.path + '\n', err.stack); + res.status(err.status || 500); if (res.locals.isAPI) {