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

Keep request on error status #163

Merged
merged 1 commit into from Mar 22, 2017
Merged

Keep request on error status #163

merged 1 commit into from Mar 22, 2017

Conversation

@geek
Copy link
Member

geek commented Mar 22, 2017

No description provided.

@geek geek added the bug label Mar 22, 2017
@geek geek added this to the 11.0.1 milestone Mar 22, 2017
@geek geek self-assigned this Mar 22, 2017
@geek geek requested a review from cjihrig Mar 22, 2017
@geek geek merged commit 901d521 into hapijs:master Mar 22, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kanongil

This comment has been minimized.

Copy link
Member

kanongil commented Mar 22, 2017

As far as I can tell this is a breaking change. To make sure that streams are actually closed on errors, a standard get would now look something like this (if you don't care about the payload for errors):

Wreck.get('https://google.com/', (err, res, payload) => {

    /* do stuff */
}).on('response', (err, details) => {

    if (err) {
        details.res.abort();
    }
});
@geek

This comment has been minimized.

Copy link
Member Author

geek commented Mar 22, 2017

@kanongil does this solution solve your needs... now you can get all of the payload details when there is an error status code

@kanongil

This comment has been minimized.

Copy link
Member

kanongil commented Mar 22, 2017

No, this solution complicates the api for almost all use cases (compared to v10), including the one in #82.

@geek

This comment has been minimized.

Copy link
Member Author

geek commented Mar 22, 2017

@kanongil ok, I'll await your fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.