Shape
Errors carry a
code, not a type; branch on code.
Mid-Stream
An error after a stream has opened arrives as a chunk with a top-levelerror object and a terminal choice with finish_reason: "error". See Error events.
The API error envelope.
code, not a type; branch on code.
error object and a terminal choice with finish_reason: "error". See Error events.