Fix #2444: avoid duplicating the message when wrapping errors with Bom

This commit is contained in:
Javier Castro 2018-12-07 12:19:51 -03:00
parent 093178462d
commit ab5b80e934

View File

@ -37,7 +37,7 @@ module.exports = strapi => {
ctx.status = error.status || 500;
ctx.body = _.get(ctx.body, 'isBoom')
? ctx.body || error && error.message
: Boom.wrap(error, ctx.status, ctx.body || error.message);
: Boom.wrap(error, ctx.status);
}
if (ctx.response.headers.location) {