Skip to content

Use response body for errors#30

Merged
anru merged 2 commits intomasterfrom
bugfix/use-error-body
Dec 27, 2016
Merged

Use response body for errors#30
anru merged 2 commits intomasterfrom
bugfix/use-error-body

Conversation

@mbektimirov
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/utils/request.js Outdated
error = new Error(err.message || String(err));
error.response = err.response;
error.responseJson = err.response;
error.response = err.response.body;
Copy link
Copy Markdown
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