When request response validation fails , when creating the Boom object, also pass along the original error object ?
https://github.com/hapijs/hapi/blob/master/lib/validation.js#L201
right now it's
return next(Boom.badImplementation(err.message));
what do you say about
return next(Boom.badImplementation(err.message, err));
or
return next(Boom.badImplementation(err.message, value));
Use case :
I'm trying to log these errors in sentry and I'm only getting the message that it failed validation at some key, if I add the err or value in data, I can see the context and debug faster.
What are your thoughts on this ? I would do a PR if you are ok.
When request response validation fails , when creating the Boom object, also pass along the original error object ?
https://github.com/hapijs/hapi/blob/master/lib/validation.js#L201
right now it's
what do you say about
or
Use case :
I'm trying to log these errors in sentry and I'm only getting the message that it failed validation at some key, if I add the
errorvaluein data, I can see the context and debug faster.What are your thoughts on this ? I would do a PR if you are ok.