Adapt JSON output to the standard structure

This commit is contained in:
Daniel García Aubert
2020-07-21 16:36:23 +02:00
parent b32a073ac3
commit 3937b8c271
21 changed files with 51 additions and 96 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]);
logger.error({ error: errors });
errors.forEach((err) => logger.error({ error: err }, 'Error while handling the request'));
setCommonHeaders(req, res, () => {
const errorResponseBody = {