Logger: rename 'error' => 'exception' to avoid name clashing in E/S

This commit is contained in:
Daniel García Aubert
2020-07-21 17:53:46 +02:00
parent 3102d895f2
commit b9198b59a1
13 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = function errorMiddleware (/* options */) {
const { logger } = res.locals;
const errors = populateLimitErrors(Array.isArray(err) ? err : [err]);
errors.forEach((err) => logger.error({ error: err }, 'Error while handling the request'));
errors.forEach((err) => logger.error({ exception: err }, 'Error while handling the request'));
setCommonHeaders(req, res, () => {
const errorResponseBody = {