Skip to contents

A 429 and the standard 5xx codes are transient. Everything else is a settled answer, and retrying it just spends someone else's capacity.

Usage

is_transient(resp)

Arguments

resp

An httr2 response.

Value

A single logical.

Examples

is_transient(httr2::response(status_code = 503))
#> [1] TRUE
is_transient(httr2::response(status_code = 404))
#> [1] FALSE