Include request and config when creating a CanceledError.#4659
Merged
jasonsaayman merged 6 commits intoaxios:masterfrom May 3, 2022
arthurfiorette:include-config-axios-abort
Merged
Include request and config when creating a CanceledError.#4659jasonsaayman merged 6 commits intoaxios:masterfrom arthurfiorette:include-config-axios-abort
CanceledError.#4659jasonsaayman merged 6 commits intoaxios:masterfrom
arthurfiorette:include-config-axios-abort
Conversation
CanceledError.CanceledError.
Contributor
Author
|
Specifically, this enables |
DigitalBrainJS
approved these changes
May 1, 2022
jasonsaayman
reviewed
May 3, 2022
Member
|
Thanks for the PR looks great :) |
Contributor
Author
|
Hey @jasonsaayman, sorry to bother you, but can you at least make a patch release with this fix soon? |
Member
|
Cool I will try get the small changes cherry picked |
Contributor
Author
|
Hey @jasonsaayman, sorry to bother you again... Can this fix be released into a new v0 patch? It is leading to many bugs when integrating with See arthurfiorette/axios-cache-interceptor/issues/317. If you could just cherry pick this PR (and #4711 & #4922 [they are related]) to v0.27.3 would be awesome!!! Thanks. |
Merged
This was referenced Oct 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, only the error thrown by a canceled request does not maintain any data connection with its original request. This way, it's basically impossible to trace back which request was canceled based on just the error thrown.
This PR only enables all available parameters to the AxiosError instance:
configandrequest.axios/lib/core/AxiosError.js
Line 15 in bc733fe
This way, any following
CanceledErrorthrown will have the request and request config available.