You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 171d893
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/resilience.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ from httpware.middleware.resilience import AsyncRetry
21
21
|`max_delay`|`5.0` (s) | Ceiling for backoff. |
22
22
|`retry_status_codes`|`frozenset({408, 429, 502, 503, 504})`| Status codes considered retryable. |
23
23
|`retry_methods`|`frozenset({"GET", "HEAD", "OPTIONS", "PUT", "DELETE"})`| Idempotent methods only by default. POST excluded; pass an explicit frozenset including `"POST"` to retry it. |
24
-
|`respect_retry_after`|`True`| When the response carries a `Retry-After` header on a retryable status, sleep for the header value (clamped to `max_delay`) instead of the jittered backoff. |
24
+
|`respect_retry_after`|`True`| When the response carries a `Retry-After` header on a retryable status, sleep for the header value instead of the jittered backoff. If the header value exceeds `max_delay`, AsyncRetry gives up and re-raises the underlying `StatusError` with a PEP 678 note `httpware: Retry-After (Ns) exceeded max_delay (Ms); giving up`. Set `max_delay` higher (or `respect_retry_after=False`) to opt out. |
25
25
|`budget`|`RetryBudget()` (default-configured) | The token bucket. Pass a shared `RetryBudget` instance to apply one budget across multiple clients. |
26
26
27
27
For a whole-attempt wall-clock bound, use `httpx2.Timeout` on the client or
@@ -185,7 +185,7 @@ from httpware.middleware.resilience import Retry
185
185
|`max_delay`|`5.0` (s) | Ceiling for backoff. |
186
186
|`retry_status_codes`|`frozenset({408, 429, 502, 503, 504})`| Status codes considered retryable. |
187
187
|`retry_methods`|`frozenset({"GET", "HEAD", "OPTIONS", "PUT", "DELETE"})`| Idempotent methods only by default. POST excluded; pass an explicit frozenset including `"POST"` to retry it. |
188
-
|`respect_retry_after`|`True`| When the response carries a `Retry-After` header on a retryable status, sleep for the header value (clamped to `max_delay`) instead of the jittered backoff. |
188
+
|`respect_retry_after`|`True`| When the response carries a `Retry-After` header on a retryable status, sleep for the header value instead of the jittered backoff. If the header value exceeds `max_delay`, Retry gives up and re-raises the underlying `StatusError` with a PEP 678 note `httpware: Retry-After (Ns) exceeded max_delay (Ms); giving up`. Set `max_delay` higher (or `respect_retry_after=False`) to opt out. |
189
189
|`budget`|`RetryBudget()` (default-configured) | The token bucket. Pass a shared `RetryBudget` instance to apply one budget across multiple clients — sync, async, or both. |
190
190
191
191
`Retry` uses `time.sleep` between attempts. `Retry-After`, streaming-body refusal, exhaustion behavior, and `RetryBudgetExhaustedError` semantics are identical to `AsyncRetry`.
0 commit comments