Wraps a fetch-shaped transport in a policy, for the seam Aphid and dung
beetle leave open.
The client turns a non-2xx response into an HttpErrorafter the
transport returns, so a decorator never sees one: a 429 arrives here as an
ordinary resolved Response. This reads the response itself, raises a
RetryableResponseError for the statuses worth repeating, and hands
the final response back untouched with its body unread, so decode and
HttpError.body behave as they do with no policy in the way.
A response that is about to be discarded has its body cancelled, and a
request that may not be repeated (the wrong method, or a body too large to
keep) is sent exactly once however many attempts the policy above it has.
Wraps a
fetch-shaped transport in a policy, for the seam Aphid and dung beetle leave open.The client turns a non-2xx response into an
HttpErrorafter the transport returns, so a decorator never sees one: a 429 arrives here as an ordinary resolvedResponse. This reads the response itself, raises a RetryableResponseError for the statuses worth repeating, and hands the final response back untouched with its body unread, sodecodeandHttpError.bodybehave as they do with no policy in the way.A response that is about to be discarded has its body cancelled, and a request that may not be repeated (the wrong method, or a body too large to keep) is sent exactly once however many attempts the policy above it has.