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

Errors when preparing a response now emit internalError correctly #716

Merged
merged 5 commits into from
Mar 29, 2013

Conversation

geek
Copy link
Member

@geek geek commented Mar 27, 2013

Closes #713

@@ -117,6 +117,7 @@ exports._respond = function (item, request, callback) {

if (response.isBoom) {
response = new internals.Error(response);
request.response = response; // Error occurs late and should update request.response object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given all the other cases where response is locally replaced, this should move right before we call callback.

hueniverse pushed a commit that referenced this pull request Mar 29, 2013
Errors when preparing a response now emit internalError correctly
@hueniverse hueniverse merged commit 21ff890 into hapijs:master Mar 29, 2013
jmonster pushed a commit to jmonster/hapi that referenced this pull request Feb 10, 2014
Errors when preparing a response now emit internalError correctly
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

internalError event not emitted on view error.
2 participants