category

fun category(failure: Throwable, rateLimited: Boolean = false): String

Classifies rate limits, HTTP errors, connection failures and timeouts in that order. A connection timeout precedes the broader HTTP timeout type. Unrecognized failures use other.

Return

a fixed category string suitable for diagnostics

Parameters

failure

the failure to inspect

rateLimited

additional rate-limit evidence supplied by a provider adapter