From 734a45ae0364a186156c724089c019a3a95e0176 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 11 Sep 2015 22:51:25 -0400 Subject: [PATCH] dont log error if its redirect --- src/routes/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {