pub fn classify_http_failure(
status: u16,
body: Option<&str>,
has_cf_ray: bool,
) -> FailureClassExpand description
Classify a non-2xx (or envelope-carrying 200) response: 401 → AuthRejected,
403 → AuthRejected or AccountNotFound per the Cloudflare error envelope,
429 → RateLimited, 5xx → ProviderServerError, and an envelope with
success: false plus a cf-ray → CloudflareEdgeError. Everything else is
Unknown - never guess a specific class without evidence.