Skip to content

Add AxiosException class #2013

@ruscon

Description

@ruscon

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);
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions