Skip to main content

unusable_reason

Function unusable_reason 

Source
fn unusable_reason(
    usage: Option<&UsageSnapshot>,
    last_error: Option<UsageFetchStatus>,
) -> Option<Unusable>
Expand description

The classification behind AccountStateMap::unusable_reason for a key already resolved to its inputs. None means usable: usage unknown, or under 100% on every window, or the last probe failed transiently (network / unknown HTTP - we just don’t know yet). Some means at the cap, or unable to authenticate.

Saturation outranks a failed probe: the windows came from a successful read, and on an at-cap account the failed probe usually IS the cap throttling the endpoint.