# InvalidOptionsError

> A spend-control option is malformed (for example a negative or non-integer maxAmount).

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

```ts
export class InvalidOptionsError extends X402AvmError {
  constructor(message: string) {
    super(message, 'invalid_options');
  }
}
```

A spend-control option is malformed (for example a negative or non-integer maxAmount).

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

Source: https://x402-avm.github.io/reference/js/invalid-options-error
