Skip to main content

parse_inline_error_frame

Function parse_inline_error_frame 

Source
fn parse_inline_error_frame(parsed: &Value) -> Option<SseParseResult>
Expand description

Parse a bare top-level error object (with no choices key) into an LlmStreamEvent::UpstreamError event.

Returns None when the frame carries no error field, or when it also carries a choices key (even an empty one) — that shape doesn’t match what downstream clients detect as an inline error, so it falls through to the remaining frame-shape checks instead.