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

Include full response with the HTTP error #175

Merged
merged 3 commits into from May 8, 2017

Conversation

@dominykas
Copy link
Contributor

dominykas commented Apr 21, 2017

Closes #173.

I'm not sure if changing the error message is a breaking change - if so - it might be worth removing the headers while at it as it duplicates response.headers.

@dominykas

This comment has been minimized.

Copy link
Contributor Author

dominykas commented Apr 21, 2017

Updated the README, so this probably now addresses #170 too?

@@ -527,9 +527,10 @@ internals.Client.prototype._shortcut = function (method, uri, options, callback)
this.read(res, options, (err, payload) => {

if (!err && res.statusCode >= 400) {
return callback(Boom.create(res.statusCode, new Error(`Response Error: ${res.statusMessage}`), {
return callback(Boom.create(res.statusCode, new Error(`Response Error: ${res.statusCode} ${res.statusMessage}`), {

This comment has been minimized.

Copy link
@AdriVanHoudt

AdriVanHoudt Apr 21, 2017

Contributor

👍

@geek geek self-assigned this May 8, 2017
@geek geek added the feature label May 8, 2017
@geek geek added this to the 12.2.0 milestone May 8, 2017
@geek geek merged commit a4d7df4 into hapijs:master May 8, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@geek geek mentioned this pull request Aug 11, 2017
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.