Python and Rust SDKs 0.2.0: what to retry, and when
hatang 0.2.0 for Python and Rust tells a call worth retrying from one that will keep failing, the way the API docs describe it.
| SDK | Release | Registry |
|---|---|---|
| Python | hatang 0.2.0 | PyPI |
| Rust | hatang 0.2.0 | crates.io |
- Retryable: Ha Tang unreachable,
429 rate_limit_exceeded,409 concurrent_idempotent_requests(the same idempotency key is still running) and 5xx. Retry with the same idempotency key. - Wait as asked: the
retry-afterheader is on the error (retry_afterin Python,retry_after()in Rust). - Daily quota:
429 daily_quota_exceededis no longer retryable, since it resets at midnight UTC. Check it withquota_exceeded(Python) oris_quota_exceeded()(Rust). - Rust only, breaking:
Error::Apihas a new field and is#[non_exhaustive]. Match it withError::Api { status, name, .. }.
See Python: results and errors and Rust: results and errors.