Error Handling
This guide covers error types and handling strategies in the Privacy Boost TypeScript SDK.Error Types
All SDK errors extend fromPrivacyBoostError:
Error Categories
Configuration Errors
| Code | Description |
|---|---|
INVALID_CONFIG | Invalid SDK configuration |
Wallet Errors
| Code | Description |
|---|---|
TRANSACTION_REJECTED | User rejected the request |
WRONG_NETWORK | Wrong network |
Authentication Errors
| Code | Description |
|---|---|
NOT_AUTHENTICATED | Not authenticated |
AUTH_NONCE_EXPIRED | Authentication nonce expired |
AUTH_INVALID_SIGNATURE | Invalid signature |
SESSION_EXPIRED | JWT token expired |
Operation Errors
| Code | Description |
|---|---|
TRANSFER_PROOF_FAILED | Transfer proof generation failed |
Network Errors
| Code | Description |
|---|---|
TIMEOUT | Request timed out |
HTTP_ERROR | HTTP request failed |
RATE_LIMITED | Rate limited |
Proof Errors
| Code | Description |
|---|---|
TRANSFER_PROOF_FAILED | Failed to generate transfer proof |