Skip to main content

classify_oauth_usage_error

Function classify_oauth_usage_error 

Source
pub(crate) fn classify_oauth_usage_error(err: &ProbeError) -> UsageFetchStatus
Expand description

Map a failed probe to the forge_gateway::UsageFetchStatus bucket. Separates HTTP 429 (the common multi-instance throttle case) from the auth-related failures (Expired / NoCredentials / Unauthorized) and transport failures (Network), so each class keeps its own meaning rather than a generic “fetch error”. Unmappable never reaches the classifiers - both callers handle a 200 that maps to nothing before classifying.