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

Add rawConfig to response errors #2798

Closed
wants to merge 5 commits into from
Closed

Add rawConfig to response errors #2798

wants to merge 5 commits into from

Conversation

brandon-leapyear
Copy link

@brandon-leapyear brandon-leapyear commented Mar 4, 2020

This is an old work account. Please reference @brandonchinn178 for all future communication


Pre-factoring for #1628 and #2650. Maintains rawConfig so that interceptors written as per #1628 can use error.rawConfig to rerun requests.

@chinesedfan
Copy link
Collaborator

In adapters, I agree that they should not care about things like combining baseURL with url. But will some users want to get the original config.url by response.config.url?

@brandon-leapyear Thanks for your quick response. But it changes too much and we should reach a consensus before coding. In fact, I reviewed #1628 again and thought it was an improper request, as well as #2391 was a hurried fix. Hope we can avoid making the mistake again.

Personal conclusions,

  • Users should save the raw config by themselves, and use that for re-request, instead of relying on error.config or response.config, which are designed for inspecting the final config.
  • Adding a rawConfig looks like making users happy, but increasing burdens of axios core.

I am not the decider. Glad to hear your and the community's voices.

@brandon-leapyear
Copy link
Author

brandon-leapyear commented Mar 5, 2020

This is an old work account. Please reference @brandonchinn178 for all future communication


Yeah, this is perhaps a POC more than anything. Happy to let this PR start the conversation.

@github-actions
Copy link
Contributor

Hello! 👋 \n\nThis pull request is being automatically marked as stale because it has not been updated in a while. Please confirm that the issue is still present and reproducible. If no updates or new comments are received the pull request will be closed in a few days. \n\nThanks

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.

None yet

3 participants