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

Use response body for errors #30

Merged
merged 2 commits into from
Dec 27, 2016
Merged

Use response body for errors #30

merged 2 commits into from
Dec 27, 2016

Conversation

mbektimirov
Copy link
Contributor

No description provided.

@@ -88,8 +88,8 @@ export default function request(method, uri, data, options) {
}

error = new Error(err.message || String(err));
error.response = err.response;
error.responseJson = err.response;
error.response = err.response.body;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you do error.response = err.response here.
It will be same behaviour as in https://github.com/FoxComm/highlander/blob/master/ashes/src/lib/api.js#L90

@anru anru merged commit 278b8e1 into master Dec 27, 2016
@anru anru deleted the bugfix/use-error-body branch December 27, 2016 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants