Module failure

Module failure 

Source
Expand description

2026-09-26: Why a streamed chat request failed, as data a caller can classify.

Owner: bench (HTTP client). Invariants:

  • Display prints message and nothing else.
  • A body set through with_body holds at most BODY_EXCERPT bytes and is cut on a char boundary.

Structs§

RequestFailure

Enums§

FailureKind

Constants§

BODY_EXCERPT
2026-09-25: The cap on the response bytes a failure carries.

Functions§

classify
2026-09-25: The failure an error from chat_stream describes. A typed failure anywhere in the chain wins; an I/O error is Transport; anything else is Other. The message is always the whole chain, as {:#} prints it.
excerpt
2026-09-25: At most BODY_EXCERPT bytes of bytes, lossily decoded, trimmed, and never split inside a character.
status_kind
2026-09-25: The code in a status line such as HTTP/1.1 503 Service Unavailable, or Malformed when it has none.