pub fn is_subscription_usage_error(err: &str) -> boolExpand description
Returns true if err looks like a failure surfaced by the
Anthropic subscription-usage poll path (/v1/messages/usage /
/api/oauth/usage). Used by clients as defence-in-depth: the
server-side handler in #940 no longer sends Response::Error for
these failures — it falls back to a cached or default
Response::SubscriptionUsage — but if a future code path were to
regress and emit such an error over the wire, clients can
recognize it as out-of-band and refrain from tearing down
streaming UI state (in-flight tool calls, agent phase, etc.).