-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Add AxiosException class #2013
Copy link
Copy link
Closed
Description
Is your feature request related to a problem? Please describe.
I use typescript.
How to verify that I received exactly axios error?
Describe the solution you'd like
Add custom error class: AxiosException, which is inherited from the standard Error class
Example
try {
axios.get('...')
}
catch(err) {
if (err instanceof AxiosException) {
console.error(err.response);
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels