> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ApiError

> X API TypeScript SDK의 ApiError 클래스 레퍼런스. HTTP 상태, 오류 코드 및 X API 오류 응답을 확인하기 위한 속성과 메서드.

X API 오류를 처리하기 위한 API Error 클래스

## 계층 구조

* `Error`

  ↳ **`ApiError`**

## 생성자

### constructor

• **new ApiError**(`message`, `status`, `statusText`, `headers`, `data?`): [`ApiError`](/xdks/typescript/reference/classes/ApiError)

#### 매개변수

| 이름           | 타입        |
| :----------- | :-------- |
| `message`    | `string`  |
| `status`     | `number`  |
| `statusText` | `string`  |
| `headers`    | `Headers` |
| `data?`      | `any`     |

#### 반환값

[`ApiError`](/xdks/typescript/reference/classes/ApiError)

#### 재정의

Error.constructor

[client.ts:123](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/client.ts#L123)

## 속성

<ResponseField name="status" type="number" required />

<ResponseField name="statusText" type="string" required />

<ResponseField name="headers" type="Headers" required />

<ResponseField name="data" type="any" />
