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

Set request object on axios errors #264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devinpitcher
Copy link

Fixes #168

Adds the request object to the error. This is important and follows the way that Axios handles errors.

@@ -148,6 +148,9 @@ function createAxiosError(message, config, response, code) {
var error = new Error(message);
error.isAxiosError = true;
error.config = config;
error.request = {
responseUrl: config.url,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be responseURL and not responseUrl. I least in my browser URL is uppercased. (see #287)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

networkError method should define a request attribute in mocked error response
2 participants