Simple default retry predicate for idempotent targets.
If your target is non-idempotent, use default_retry_predicate_non_idempotent instead.
Retries on 429
(Too Many Requests), 502
(Bad Gateway),
503
(Service unavailable), and 504
(Gateway Timeout), as well as on any
ConnectionError
, ConnectionFailedError
, and TimeoutError
.
For more information, see Retry steps.
Arguments
Arguments | |
---|---|
exception |
The error to apply the retry criterion upon. |
Returns
true
when the retry criterion is satisfied, false
otherwise.