Skip to main content
The SDK provides two error class hierarchies: APIError for general SDK errors, and WithdrawError for withdrawal-specific failures. Type guard functions are exported for programmatic error handling.

Import

APIError Class

WithdrawError Hierarchy

Withdrawal operations throw specialized error subclasses with a code property for programmatic handling.

Exported Error Classes

Internal Error Subclasses

These are thrown internally but can be caught as WithdrawError:

Error Type Guards

Usage

Common Error Scenarios

Initialization

Deposits

Withdrawals

Error Handling Patterns

Basic Error Handling

Logging Errors

User-Friendly Messages