Error Types
All SDK errors are variants ofKrakenError:
Basic Handling
Retry Logic
Error Categories
- Retryable
- Permanent
- Automatic
These errors may succeed on retry:
| Error | Recovery |
|---|---|
ConnectionFailed | Wait and retry |
RateLimited | Wait retry_after duration |
WebSocket (some) | Reconnect |
Timeout | Retry with backoff |
Production Pattern
Best Practices
Log Everything
Always log the full error, including
raw fields for API errors.Use is_retryable()
Don’t hardcode retry logic. Use the built-in classification.
Handle BufferOverflow
This event means your handler is too slow. Optimize or filter.
Don't Swallow Errors
At minimum, log errors you don’t handle. Silent failures kill systems.