# クラス: InferenceClientError

推論関連のすべてのエラーの基底クラス。

## 階層

- `Error`

  ↳ **`InferenceClientError`**

  ↳↳ [`InferenceClientInputError`](InferenceClientInputError)

  ↳↳ [`InferenceClientRoutingError`](InferenceClientRoutingError)

  ↳↳ [`InferenceClientProviderOutputError`](InferenceClientProviderOutputError)

## コンストラクタ

### constructor

• **new InferenceClientError**(`message`): [`InferenceClientError`](InferenceClientError)

#### パラメータ[[constructor.parameters]]

| 名前 | 型 |
| :------ | :------ |
| `message` | `string` |

#### 返り値[[constructor.returns]]

[`InferenceClientError`](InferenceClientError)

#### オーバーライド[[constructor.overrides]]

Error.constructor

#### 定義場所[[constructor.defined-in]]

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

## プロパティ

### 原因

• `Optional` **cause**: `unknown`

#### 継承元[[cause.inherited-from]]

Error.cause

#### 定義場所[[cause.defined-in]]

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

___

### メッセージ

• **message**: `string`

#### 継承元[[message.inherited-from]]

Error.message

#### 定義場所[[message.defined-in]]

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

___

### 名前

• **name**: `string`

#### 継承元[[name.inherited-from]]

Error.name

#### 定義場所[[name.defined-in]]

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

___

### スタック

• `Optional` **スタック**: `string`

#### 継承元[[stack.inherited-from]]

Error.stack

#### 定義場所[[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`

スタックトレースのフォーマットをオーバーライドするための任意のオプション

**`See`**

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

#### 型宣言[[preparestacktrace.type-declaration]]

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

##### パラメータ[[preparestacktrace.parameters]]

| 名前 | 型 |
| :------ | :------ |
| `err` | `Error` |
| `stackTraces` | `CallSite`[] |

##### 返り値[[preparestacktrace.returns]]

`any`

#### 継承元[[preparestacktrace.inherited-from]]

Error.prepareStackTrace

#### 定義場所[[preparestacktrace.defined-in]]

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

___

### stackTraceLimit

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

#### 継承元[[stacktracelimit.inherited-from]]

Error.stackTraceLimit

#### 定義場所[[stacktracelimit.defined-in]]

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

## メソッド

### captureStackTrace

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

ターゲットオブジェクトに.stackプロパティを作成します

#### パラメータ[[capturestacktrace.parameters]]

| 名前 | 型 |
| :------ | :------ |
| `targetObject` | `object` |
| `constructorOpt?` | `Function` |

#### 返り値[[capturestacktrace.returns]]

`void`

#### 継承元[[capturestacktrace.inherited-from]]

Error.captureStackTrace

#### 定義場所[[capturestacktrace.defined-in]]

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

