Expand description
Retry helper for transient Bedrock errors.
Bedrock throttles aggressively under load. This module implements
exponential backoff + jitter for ThrottlingException (HTTP 429) and
ServiceUnavailableException (HTTP 503). Non-retryable errors (auth,
validation, 4xx other than 429) are returned immediately.
§Examples
use codetether_agent::provider::bedrock::retry::{RetryPolicy, should_retry_status};
let policy = RetryPolicy::default();
assert_eq!(policy.max_attempts, 4);
assert!(should_retry_status(429));
assert!(should_retry_status(503));
assert!(!should_retry_status(400));
assert!(!should_retry_status(200));Structs§
- Retry
Policy - Exponential backoff config.
Functions§
- should_
retry_ status - Return true for HTTP status codes worth retrying.