From 1d62bd6d7b6de45a1a13ee9e4548b670729bccd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 21 Oct 2021 12:34:26 -0400 Subject: [PATCH] refactor: log error as well --- src/controllers/errors.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/errors.js b/src/controllers/errors.js index 2ea7e472cb..1f8a401e2e 100644 --- a/src/controllers/errors.js +++ b/src/controllers/errors.js @@ -88,6 +88,7 @@ exports.handleErrors = async function handleErrors(err, req, res, next) { // esl await defaultHandler(); } } catch (_err) { + winston.error(`${req.originalUrl}\n${_err.stack}`); res.status(500).send(_err.message); } };