Error Handling
The SDK raises typed exceptions for every failure mode — network errors, API errors, timeouts, and authentication failures.Exception hierarchy
- Python
- TypeScript
Catching errors
- Python
- TypeScript
ZabyApiError fields
HTTP status code
Human-readable summary
Machine-readable error code
Request identifier for support (Python)
Request identifier for support (TypeScript)
Seconds to wait before retrying (from Retry-After header)
Full response body
Status codes
400 Bad Request
400 Bad Request
Malformed request payload or invalid parameters
- Python
- TypeScript
403 Forbidden
403 Forbidden
Insufficient permissions for the requested operation
- Python
- TypeScript
404 Not Found
404 Not Found
Resource does not exist
- Python
- TypeScript
409 Conflict
409 Conflict
Duplicate slug or version conflict
429 Rate Limited
429 Rate Limited
Too many requests — back off and retry
- Python
- TypeScript
Configure retries to handle 429s automatically.
5xx Server Error
5xx Server Error
Temporary server-side failure — retry with backoff
Runtime Token Expired
Runtime Token Expired
Runtime JWT has expired — generate a new token
- Python
- TypeScript
Stream Error
Stream Error
SSE stream disconnected or malformed event
- Python
- TypeScript
Error factory
Both SDKs expose a factory function that maps an error code or status to the correct exception subclass — useful when parsing raw API responses:- Python
- TypeScript
Retry strategy
- Python
- TypeScript
Common issues
404 Not Found
404 Not Found
Verify the resource exists and has been published:
- Python
- TypeScript
Request timeout
Request timeout
Increase the timeout for long-running operations:
- Python
- TypeScript
Connection refused
Connection refused
Verify your local server is running:
- Python
- TypeScript
Debugging
Enable debug logging to inspect requests and responses:- Python
- TypeScript
Testing
MockTransport for deterministic testing.
Configuration
Full configuration reference.

