When the response value is a boom object the following code is used to log (from here):
if (response.isBoom) {
request._log(['handler', 'error'], { msec: timer.elapsed(), error: response.message });
return callback(response);
}
This does not send the entire error instance but only the message. It is can be valuable to be able to log additional information such as the status code.
Proposal:
if (response.isBoom) {
request._log(['handler', 'error'], { msec: timer.elapsed(), error: response });
return callback(response);
}
Sending a PR with the change and a test.