Skip to main content

Exception Types

The SDK provides specific exception types for different error scenarios:

Exception Hierarchy

Error Properties

All exceptions include helpful properties:

Rate Limiting

Handle rate limits with automatic retry:
The SDK automatically retries failed requests up to max_retries times (default: 3) with exponential backoff.

Connection Errors

Handle network issues:

Best Practices

Catch Specific Exceptions First

Use Context Manager for Async