# WithdrawAmountError

Defined in: [packages/synapse-core/src/errors/pay.ts:44](https://github.com/FilOzone/synapse-sdk/blob/560869c9b2c153a9aa5bee1fa6e357bae2c11309/packages/synapse-core/src/errors/pay.ts#L44)

## Extends

- [`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/)

## Constructors

### Constructor

```ts
new WithdrawAmountError(amount): WithdrawAmountError;
```

Defined in: [packages/synapse-core/src/errors/pay.ts:47](https://github.com/FilOzone/synapse-sdk/blob/560869c9b2c153a9aa5bee1fa6e357bae2c11309/packages/synapse-core/src/errors/pay.ts#L47)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `amount` | `bigint` |

#### Returns

`WithdrawAmountError`

#### Overrides

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`constructor`](/reference/filoz/synapse-core/errors/classes/synapseerror/#constructor)

## Properties

### \[symbol\]

```ts
[symbol]: boolean = true;
```

Defined in: [packages/synapse-core/src/errors/base.ts:17](https://github.com/FilOzone/synapse-sdk/blob/560869c9b2c153a9aa5bee1fa6e357bae2c11309/packages/synapse-core/src/errors/base.ts#L17)

#### Inherited from

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`[symbol]`](/reference/filoz/synapse-core/errors/classes/synapseerror/#symbol)

***

### cause?

```ts
optional cause: Error;
```

Defined in: [packages/synapse-core/src/errors/base.ts:20](https://github.com/FilOzone/synapse-sdk/blob/560869c9b2c153a9aa5bee1fa6e357bae2c11309/packages/synapse-core/src/errors/base.ts#L20)

#### Inherited from

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`cause`](/reference/filoz/synapse-core/errors/classes/synapseerror/#cause)

***

### details?

```ts
optional details: string;
```

Defined in: [packages/synapse-core/src/errors/base.ts:21](https://github.com/FilOzone/synapse-sdk/blob/560869c9b2c153a9aa5bee1fa6e357bae2c11309/packages/synapse-core/src/errors/base.ts#L21)

#### Inherited from

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`details`](/reference/filoz/synapse-core/errors/classes/synapseerror/#details)

***

### message

```ts
message: string;
```

Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077

#### Inherited from

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`message`](/reference/filoz/synapse-core/errors/classes/synapseerror/#message)

***

### name

```ts
name: "WithdrawAmountError" = 'WithdrawAmountError';
```

Defined in: [packages/synapse-core/src/errors/pay.ts:45](https://github.com/FilOzone/synapse-sdk/blob/560869c9b2c153a9aa5bee1fa6e357bae2c11309/packages/synapse-core/src/errors/pay.ts#L45)

#### Overrides

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`name`](/reference/filoz/synapse-core/errors/classes/synapseerror/#name)

***

### shortMessage

```ts
shortMessage: string;
```

Defined in: [packages/synapse-core/src/errors/base.ts:22](https://github.com/FilOzone/synapse-sdk/blob/560869c9b2c153a9aa5bee1fa6e357bae2c11309/packages/synapse-core/src/errors/base.ts#L22)

#### Inherited from

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`shortMessage`](/reference/filoz/synapse-core/errors/classes/synapseerror/#shortmessage)

***

### stack?

```ts
optional stack: string;
```

Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078

#### Inherited from

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`stack`](/reference/filoz/synapse-core/errors/classes/synapseerror/#stack)

***

### stackTraceLimit

```ts
static stackTraceLimit: number;
```

Defined in: node\_modules/.pnpm/@types+node@24.10.4/node\_modules/@types/node/globals.d.ts:68

The `Error.stackTraceLimit` property specifies the number of stack frames
collected by a stack trace (whether generated by `new Error().stack` or
`Error.captureStackTrace(obj)`).

The default value is `10` but may be set to any valid JavaScript number. Changes
will affect any stack trace captured _after_ the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will
not capture any frames.

#### Inherited from

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`stackTraceLimit`](/reference/filoz/synapse-core/errors/classes/synapseerror/#stacktracelimit)

## Methods

### captureStackTrace()

```ts
static captureStackTrace(targetObject, constructorOpt?): void;
```

Defined in: node\_modules/.pnpm/@types+node@24.10.4/node\_modules/@types/node/globals.d.ts:52

Creates a `.stack` property on `targetObject`, which when accessed returns
a string representing the location in the code at which
`Error.captureStackTrace()` was called.

```js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`
```

The first line of the trace will be prefixed with
`${myObject.name}: ${myObject.message}`.

The optional `constructorOpt` argument accepts a function. If given, all frames
above `constructorOpt`, including `constructorOpt`, will be omitted from the
generated stack trace.

The `constructorOpt` argument is useful for hiding implementation
details of error generation from the user. For instance:

```js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
```

#### Parameters

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

#### Returns

`void`

#### Inherited from

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`captureStackTrace`](/reference/filoz/synapse-core/errors/classes/synapseerror/#capturestacktrace)

***

### is()

```ts
static is(value): value is WithdrawAmountError;
```

Defined in: [packages/synapse-core/src/errors/pay.ts:53](https://github.com/FilOzone/synapse-sdk/blob/560869c9b2c153a9aa5bee1fa6e357bae2c11309/packages/synapse-core/src/errors/pay.ts#L53)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `unknown` |

#### Returns

`value is WithdrawAmountError`

#### Overrides

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`is`](/reference/filoz/synapse-core/errors/classes/synapseerror/#is)

***

### prepareStackTrace()

```ts
static prepareStackTrace(err, stackTraces): any;
```

Defined in: node\_modules/.pnpm/@types+node@24.10.4/node\_modules/@types/node/globals.d.ts:56

#### Parameters

| Parameter | 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

#### Inherited from

[`SynapseError`](/reference/filoz/synapse-core/errors/classes/synapseerror/).[`prepareStackTrace`](/reference/filoz/synapse-core/errors/classes/synapseerror/#preparestacktrace)