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

# Yor.ts | classes/YorClientError

[yor.ts](../README) / [Exports](../modules) / YorClientError

# Class: YorClientError

## Hierarchy

* [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)

  ↳ **`YorClientError`**

## Table of contents

### Constructors

* [constructor](YorClientError#constructor)

### Properties

* [cause](YorClientError#cause)
* [message](YorClientError#message)
* [name](YorClientError#name)
* [stack](YorClientError#stack)
* [prepareStackTrace](YorClientError#preparestacktrace)
* [stackTraceLimit](YorClientError#stacktracelimit)

### Methods

* [captureStackTrace](YorClientError#capturestacktrace)

## Constructors

### constructor

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

#### Parameters

| Name      | Type     |
| :-------- | :------- |
| `message` | `string` |

#### Returns

[`YorClientError`](YorClientError)

#### Overrides

Error.constructor

#### Defined in

[src/structures/YorClientError.ts:2](https://github.com/OreOreki/yor.ts/blob/ff21935/src/structures/YorClientError.ts#L2)

## Properties

### cause

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

#### Inherited from

Error.cause

#### Defined in

node\_modules/.pnpm/typescript\@5.3.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24

***

### message

• **message**: `string`

#### Inherited from

Error.message

#### Defined in

node\_modules/.pnpm/typescript\@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1076

***

### name

• **name**: `string`

#### Inherited from

Error.name

#### Defined in

node\_modules/.pnpm/typescript\@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1075

***

### stack

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

#### Inherited from

Error.stack

#### Defined in

node\_modules/.pnpm/typescript\@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1077

***

### prepareStackTrace

▪ `Static` `Optional` **prepareStackTrace**: (`err`: [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), `stackTraces`: `CallSite`\[]) => `any`

#### Type declaration

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

Optional override for formatting stack traces

##### Parameters

| Name          | Type                                                                                        |
| :------------ | :------------------------------------------------------------------------------------------ |
| `err`         | [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) |
| `stackTraces` | `CallSite`\[]                                                                               |

##### Returns

`any`

**`See`**

[https://v8.dev/docs/stack-trace-api#customizing-stack-traces](https://v8.dev/docs/stack-trace-api#customizing-stack-traces)

#### Inherited from

Error.prepareStackTrace

#### Defined in

node\_modules/.pnpm/@types+node\@20.10.4/node\_modules/@types/node/globals.d.ts:28

***

### stackTraceLimit

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

#### Inherited from

Error.stackTraceLimit

#### Defined in

node\_modules/.pnpm/@types+node\@20.10.4/node\_modules/@types/node/globals.d.ts:30

## Methods

### captureStackTrace

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

Create .stack property on a target object

#### Parameters

| Name              | Type                                                                                              |
| :---------------- | :------------------------------------------------------------------------------------------------ |
| `targetObject`    | `object`                                                                                          |
| `constructorOpt?` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) |

#### Returns

`void`

#### Inherited from

Error.captureStackTrace

#### Defined in

node\_modules/.pnpm/@types+node\@20.10.4/node\_modules/@types/node/globals.d.ts:21
