Skip to content

Node.js based forum software built for the modern web

dont log error if its redirect

barisusakli734a45ae0364
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) {