refactor: log error as well

This commit is contained in:
Barış Soner Uşaklı
2021-10-21 12:34:26 -04:00
parent 73a9ca09c9
commit 1d62bd6d7b

View File

@@ -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);
}
};