auto-retry on HTTP 429 #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 2 plumbed the controller's
Retry-Afterheader intoApiError::RateLimited { retry_after_secs }so the value reaches the JSON envelope, but the CLI does not retry the request. Add a bounded auto-retry (e.g. up to 3 attempts, capped delay) that waits for the indicated seconds before retrying idempotent reads. Mutating ops should not auto-retry by default.\n\nSeecrates/unifi-api/src/error.rsandcrates/unifi-cli/tests/mock_retry.rs.Implemented in
f160869: RetryPolicy threaded through Ctx; paginate::fetch_all wraps each page in retry::call. CLI flags --max-retries (default 3) and --retry-cap-secs (default 60). Tests cover ok/retry-then-succeed/give-up/non-429 passthrough.