# Class AxiosError<T, D>

#### Type Parameters

- T = unknown
- D = any

#### Hierarchy (View Summary)

- Error
  - AxiosError
    - CanceledError

- Defined in node_modules/axios/index.d.ts:403

##### Index

### Constructors

constructor

### Properties

cause?
code?
config?
isAxiosError
message
name
request?
response?
stack?
status?
toJSON
ECONNABORTED
ERR_BAD_OPTION
ERR_BAD_OPTION_VALUE
ERR_BAD_REQUEST
ERR_BAD_RESPONSE
ERR_CANCELED
ERR_DEPRECATED
ERR_FR_TOO_MANY_REDIRECTS
ERR_INVALID_URL
ERR_NETWORK
ERR_NOT_SUPPORT
ETIMEDOUT
prepareStackTrace?
stackTraceLimit

### Methods

captureStackTrace
from

## Constructors

### constructor

- new AxiosError< T = unknown, D = any>(
  message?: string,
  code?: string,
  config?: InternalAxiosRequestConfig < D >,
  request?: any,
  response?: AxiosResponse < T , D >,
  ): AxiosError < T , D >

  #### Type Parameters

  - T = unknown
  - D = any

  #### Parameters

  - `Optional` message: string
  - `Optional` code: string
  - `Optional` config: InternalAxiosRequestConfig < D >
  - `Optional` request: any
  - `Optional` response: AxiosResponse < T , D >

  #### Returns AxiosError < T , D >

  Overrides Error.constructor

  - Defined in node_modules/axios/index.d.ts:404

## Properties

### `Optional` cause

cause?: Error

Overrides Error.cause

- Defined in node_modules/axios/index.d.ts:419

### `Optional` code

code?: string

- Defined in node_modules/axios/index.d.ts:413

### `Optional` config

config?: InternalAxiosRequestConfig < D >

- Defined in node_modules/axios/index.d.ts:412

### isAxiosError

isAxiosError: boolean

- Defined in node_modules/axios/index.d.ts:416

### message

message: string

Inherited from Error.message

- Defined in node_modules/typescript/lib/lib.es5.d.ts:1077

### name

name: string

Inherited from Error.name

- Defined in node_modules/typescript/lib/lib.es5.d.ts:1076

### `Optional` request

request?: any

- Defined in node_modules/axios/index.d.ts:414

### `Optional` response

response?: AxiosResponse < T , D >

- Defined in node_modules/axios/index.d.ts:415

### `Optional` stack

stack?: string

Inherited from Error.stack

- Defined in node_modules/typescript/lib/lib.es5.d.ts:1078

### `Optional` status

status?: number

- Defined in node_modules/axios/index.d.ts:417

### toJSON

toJSON: () => object

- Defined in node_modules/axios/index.d.ts:418

### `Static` `Readonly` ECONNABORTED

ECONNABORTED: "ECONNABORTED"

- Defined in node_modules/axios/index.d.ts:438

### `Static` `Readonly` ERR_BAD_OPTION

ERR_BAD_OPTION: "ERR_BAD_OPTION"

- Defined in node_modules/axios/index.d.ts:430

### `Static` `Readonly` ERR_BAD_OPTION_VALUE

ERR_BAD_OPTION_VALUE: "ERR_BAD_OPTION_VALUE"

- Defined in node_modules/axios/index.d.ts:429

### `Static` `Readonly` ERR_BAD_REQUEST

ERR_BAD_REQUEST: "ERR_BAD_REQUEST"

- Defined in node_modules/axios/index.d.ts:434

### `Static` `Readonly` ERR_BAD_RESPONSE

ERR_BAD_RESPONSE: "ERR_BAD_RESPONSE"

- Defined in node_modules/axios/index.d.ts:433

### `Static` `Readonly` ERR_CANCELED

ERR_CANCELED: "ERR_CANCELED"

- Defined in node_modules/axios/index.d.ts:437

### `Static` `Readonly` ERR_DEPRECATED

ERR_DEPRECATED: "ERR_DEPRECATED"

- Defined in node_modules/axios/index.d.ts:432

### `Static` `Readonly` ERR_FR_TOO_MANY_REDIRECTS

ERR_FR_TOO_MANY_REDIRECTS: "ERR_FR_TOO_MANY_REDIRECTS"

- Defined in node_modules/axios/index.d.ts:428

### `Static` `Readonly` ERR_INVALID_URL

ERR_INVALID_URL: "ERR_INVALID_URL"

- Defined in node_modules/axios/index.d.ts:436

### `Static` `Readonly` ERR_NETWORK

ERR_NETWORK: "ERR_NETWORK"

- Defined in node_modules/axios/index.d.ts:431

### `Static` `Readonly` ERR_NOT_SUPPORT

ERR_NOT_SUPPORT: "ERR_NOT_SUPPORT"

- Defined in node_modules/axios/index.d.ts:435

### `Static` `Readonly` ETIMEDOUT

ETIMEDOUT: "ETIMEDOUT"

- Defined in node_modules/axios/index.d.ts:439

### `Static` `Optional` prepareStackTrace

prepareStackTrace?: (err: Error, stackTraces: CallSite []) => any

Optional override for formatting stack traces

#### See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from Error.prepareStackTrace

- Defined in node_modules/@types/node/globals.d.ts:143

### `Static` stackTraceLimit

stackTraceLimit: number

Inherited from Error.stackTraceLimit

- Defined in node_modules/@types/node/globals.d.ts:145

## Methods

### `Static` captureStackTrace

- captureStackTrace(targetObject: object, constructorOpt?: Function): void

  Create .stack property on a target object

  #### Parameters

  - targetObject: object
  - `Optional` constructorOpt: Function

  #### Returns void

  Inherited from Error.captureStackTrace

  - Defined in node_modules/@types/node/globals.d.ts:136

### `Static` from

- from< T = unknown, D = any>(
  error: unknown,
  code?: string,
  config?: InternalAxiosRequestConfig < D >,
  request?: any,
  response?: AxiosResponse < T , D >,
  customProps?: object,
  ): AxiosError < T , D >

  #### Type Parameters

  - T = unknown
  - D = any

  #### Parameters

  - error: unknown
  - `Optional` code: string
  - `Optional` config: InternalAxiosRequestConfig < D >
  - `Optional` request: any
  - `Optional` response: AxiosResponse < T , D >
  - `Optional` customProps: object

  #### Returns AxiosError < T , D >

  - Defined in node_modules/axios/index.d.ts:420