# Lớp: InferenceClientRoutingError

Lớp cơ sở cho tất cả các lỗi liên quan đến suy luận.

## Hệ thống phân cấp

- [`InferenceClientError`](InferenceClientError)

  ↳ **`InferenceClientRoutingError`**

## Hàm khởi tạo

### constructor

• **mới InferenceClientRoutingError**(`message`): [`InferenceClientRoutingError`](InferenceClientRoutingError)

#### Tham số[[constructor.parameters]]

| Tên | Loại |
| :------ | :------ |
| `message` | `string` |

#### Trả về[[constructor.returns]]

[`InferenceClientRoutingError`](InferenceClientRoutingError)

#### Ghi đè[[constructor.overrides]]

[InferenceClientError](InferenceClientError).[constructor](InferenceClientError#constructor)

#### Được định nghĩa trong[[constructor.defined-in]]

[inference/src/errors.ts:21](https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/errors.ts#L21)

## Thuộc tính

### nguyên nhân

• **nguyên nhân** `Optional`: `unknown`

#### Kế thừa từ[[cause.inherited-from]]

[InferenceClientError](InferenceClientError).[cause](InferenceClientError#cause)

#### Được định nghĩa trong[[cause.defined-in]]

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

___

### message

• **message**: `string`

#### Kế thừa từ[[message.inherited-from]]

[InferenceClientError](InferenceClientError).[message](InferenceClientError#message)

#### Được định nghĩa trong[[message.defined-in]]

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts:1077

___

### name

• **name**: `string`

#### Kế thừa từ[[name.inherited-from]]

[InferenceClientError](InferenceClientError).[name](InferenceClientError#name)

#### Được định nghĩa trong[[name.defined-in]]

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts:1076

___

### stack

• **stack** `Optional`: `string`

#### Kế thừa từ[[stack.inherited-from]]

[InferenceClientError](InferenceClientError).[stack](InferenceClientError#stack)

#### Được định nghĩa trong[[stack.defined-in]]

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts:1078

___

### prepareStackTrace

▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any`

Ghi đè tùy chọn cho việc định dạng vết chồng

**`See`**

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

#### Khai báo kiểu[[preparestacktrace.type-declaration]]

▸ (`err`, `stackTraces`): `any`

##### Tham số[[preparestacktrace.parameters]]

| Tên | Loại |
| :------ | :------ |
| `err` | `Error` |
| `stackTraces` | `CallSite`[] |

##### Trả về[[preparestacktrace.returns]]

`any`

#### Kế thừa từ[[preparestacktrace.inherited-from]]

[InferenceClientError](InferenceClientError).[prepareStackTrace](InferenceClientError#preparestacktrace)

#### Được định nghĩa trong[[preparestacktrace.defined-in]]

inference/node_modules/.pnpm/@types+node@18.13.0/node_modules/@types/node/globals.d.ts:11

___

### stackTraceLimit

▪ `Static` **stackTraceLimit**: `number`

#### Kế thừa từ[[stacktracelimit.inherited-from]]

[InferenceClientError](InferenceClientError).[stackTraceLimit](InferenceClientError#stacktracelimit)

#### Được định nghĩa trong[[stacktracelimit.defined-in]]

inference/node_modules/.pnpm/@types+node@18.13.0/node_modules/@types/node/globals.d.ts:13

## Phương thức

### captureStackTrace

▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`

Tạo thuộc tính .stack trên một đối tượng đích

#### Tham số[[capturestacktrace.parameters]]

| Tên | Loại |
| :------ | :------ |
| `targetObject` | `object` |
| `constructorOpt?` | `Function` |

#### Trả về[[capturestacktrace.returns]]

`void`

#### Kế thừa từ[[capturestacktrace.inherited-from]]

[InferenceClientError](InferenceClientError).[captureStackTrace](InferenceClientError#capturestacktrace)

#### Được định nghĩa trong[[capturestacktrace.defined-in]]

inference/node_modules/.pnpm/@types+node@18.13.0/node_modules/@types/node/globals.d.ts:4

