Std.Http.Retry.worthRetrying
1 declaration
fn
worthRetrying: &Result[Std.Http.Response, Std.Http.Client.ClientError] -> BoolThis is a callable function.
What it does
Whether a failure is worth trying again.
A request is retried when nothing says it was received and acted on: a
connection that failed, a deadline that passed, a gateway that had nothing
behind it. It is not retried when the answer says the request itself was
wrong — a 400 sent twice is wrong twice — nor on a 500, which says the
request was received and something went wrong while acting on it, and which
may well have half-happened.
The exception is 429 and 503, which are a service asking to be asked later.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
- & borrows a value for this call instead of moving or copying it.
- Names inside [ ] are type arguments, such as the item type held by a collection.
- Result makes success and recoverable failure part of the function's type.
