# SpendLimitExceededError

> The requested amount is above the client's spend cap.

```ts
import { SpendLimitExceededError } from 'x402-avm-js';
```

```ts
export class SpendLimitExceededError extends X402AvmError {
  readonly asset: string;
  readonly amount: bigint;
  readonly limit: bigint;

  constructor(asset: string, amount: bigint, limit: bigint) {
    super(
      `Refusing to pay ${amount} base units of asset ${asset}: above the spend limit of ${limit}. ` +
        'Raise it explicitly with the maxAmount option if this is intended.',
      'spend_limit_exceeded'
    );
    this.asset = asset;
    this.amount = amount;
    this.limit = limit;
  }
}
```

The requested amount is above the client's spend cap. Thrown before anything is signed.

Source: [src/errors.ts](https://github.com/x402-avm/x402-avm-js/blob/main/src/errors.ts#L54)

Source: https://x402-avm.github.io/reference/js/spend-limit-exceeded-error
