is_retryable_http_status

Function is_retryable_http_status 

Source
pub fn is_retryable_http_status(status: StatusCode) -> bool
Expand description

Determine if an HTTP status code is retryable.

§Retryable Status Codes

  • 429 (Too Many Requests) - Rate limiting
  • 500 (Internal Server Error) - Server error
  • 502 (Bad Gateway) - Proxy/gateway error
  • 503 (Service Unavailable) - Temporary unavailability
  • 504 (Gateway Timeout) - Gateway timeout

§Arguments

  • status - The HTTP status code to check

§Returns

true if the status code indicates a transient error, false otherwise