Reputation: 1135
I'm trying to return the error object inside the response of a boom internal error object but it keeps omitting the error object. I tried to follow the answer here but it didn't help.
function (request, reply) {
options.healthCheck(function (err) {
if (!err) {
return reply('I\'m healthy!!!');
}
var boomErr = boom.internal('I don\'t feel so good', {
err: err
});
boomErr.output.payload.details = err;
return reply(boomErr);
});
}
Here is the response:
{
"statusCode":500,
"error":"Internal Server Error",
"message":"An internal server error occurred",
"details":{ }
}
Upvotes: 1
Views: 2874