Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging boom errors from handlers should send boom error to log not just message #2308

dschenkelman opened this issue Dec 19, 2014 · 1 comment
feature New functionality or improvement


Copy link

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.


if (response.isBoom) {
    request._log(['handler', 'error'], { msec: timer.elapsed(), error: response });
    return callback(response);

Sending a PR with the change and a test.

@hueniverse hueniverse self-assigned this Jan 5, 2015
hueniverse pushed a commit that referenced this issue Feb 8, 2015
Fixes #2308 by logging boom error object instead of just message
@hueniverse hueniverse added this to the 8.2.0 milestone Feb 8, 2015
@Marsup Marsup added feature New functionality or improvement and removed request labels Sep 20, 2019
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
feature New functionality or improvement
None yet

No branches or pull requests

3 participants