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

Closed
dschenkelman opened this issue Dec 19, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@dschenkelman
Copy link
Contributor

@dschenkelman dschenkelman commented Dec 19, 2014

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.

@hueniverse hueniverse self-assigned this Jan 5, 2015
@hueniverse hueniverse closed this in 48a03f0 Feb 8, 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 and removed request labels Sep 20, 2019
@lock
Copy link

@lock 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.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants