Skip to main content

http_outcome_label

Function http_outcome_label 

Source
pub const fn http_outcome_label(status: Option<u16>) -> &'static str
Expand description

Maps an HTTP status code (or lack thereof) to a normalized outcome metric label:

  • "ok" for HTTP 2xx success responses.
  • "retryable_error" for retryable HTTP statuses (408, 429, 5xx) or non-HTTP failures (None).
  • "other_error" for all other client or non-retryable statuses.