In the Hapi documentation, it refers to the output.payload
property of the arrow object; the default is statusCode
, error
and message
.
I was able to infer data from an arrow error by setting .details
to this object:
{ method: 'PUT', path:'foo', handler: function (request, reply) { var err = Boom.badRequest('something', { stuff: 'and more' }); err.output.payload.details = err.data; reply(err); } }
Not the most ideal thing in the world, but probably safe by default.
source share