TransportFailureDiagnostics

@ApiStatus.Experimental
object TransportFailureDiagnostics

Bounded transport categories for diagnostics. These do not choose a retry policy or a result. Unknown exception types produce other; exception messages never become category values. Adapter-specific invalid-response and SDK rate-limit recognition belong to the caller.

Functions

Link copied to clipboard
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.

Link copied to clipboard
fun causes(failure: Throwable): List<Throwable>

Visits each cause once, from the outer failure inward, using identity to stop on cycles.

Link copied to clipboard
fun httpStatus(failure: Throwable): Int?

Finds the first typed Spring HTTP status in the cause chain without interpreting messages.