Skip to main content

should_retry_http_error

Function should_retry_http_error 

Source
pub fn should_retry_http_error(error: &DeriveHttpError) -> bool
Expand description

Returns true for HTTP errors that can safely be retried with backoff.

Retryable categories:

  • Transport failures (connection reset, timeout, DNS).
  • HTTP 5xx and 408 / 429.
  • JSON-RPC Server error codes in the -32099..=-32000 range.

Everything else (validation, signed-fee-too-low, insufficient-margin, auth failure) is terminal and must not be retried.