Errors and Retries
All SDK errors inherit fromDalyAPIError.
Exception Mapping
| HTTP condition | Exception |
|---|---|
401 | AuthenticationError |
403 | ForbiddenError |
404 | NotFoundError |
409 | ConflictError |
400 / 422 | ValidationError |
429 | RateLimitError |
5xx | ServerError |
| request timeout | TimeoutError |
| other non-2xx | DalyAPIError |
Retry Semantics
- The SDK does not do general automatic retries.
- It retries once only for
401after token invalidation/refresh. - Caller-managed retries are recommended for
429, transient5xx, and timeouts.
Rate-Limit Support
RateLimitError includes retry_after when API returns Retry-After header.
Timeout Semantics
SDK wrapshttpx timeout exceptions into TimeoutError with:
status_code = 0- consistent
DalyAPIErrorinheritance for unified exception handling
