WebacyError class, making it easy to catch and respond to different failure scenarios.
Error Classes
| Error | HTTP Status | Description |
|---|---|---|
AuthenticationError | 401 | Invalid or missing API key |
ValidationError | 400 | Invalid input parameters |
RateLimitError | 429 | Rate limit exceeded |
NotFoundError | 404 | Resource not found |
NetworkError | - | Network connectivity issues |
WebacyError | Various | Base class for all errors |
Basic Error Handling
Error Properties
All SDK errors include these properties:Recovery Suggestions
Errors provide recovery suggestions:Specific Error Types
AuthenticationError
Thrown when the API key is invalid or missing.ValidationError
Thrown when input parameters are invalid.RateLimitError
Thrown when you exceed API rate limits. The SDK automatically retries rate-limited requests with exponential backoff.NotFoundError
Thrown when the requested resource doesn’t exist.NetworkError
Thrown when there are network connectivity issues.Retryable Errors
Check if an error can be retried:RateLimitError- Wait and retryNetworkError- Retry after connectivity restored
AuthenticationError- Fix API keyValidationError- Fix inputNotFoundError- Resource doesn’t exist
