Error class for errors received via SSE stream events.
Unlike SanityAgentError (which is thrown for HTTP-level errors before
streaming starts), this wraps errors received mid-stream as SSE error events.
The code carries the backend's error classification (e.g. UPSTREAM_OVERLOADED)
so clients can take targeted action without parsing the message string.
Error class for errors received via SSE stream events. Unlike SanityAgentError (which is thrown for HTTP-level errors before streaming starts), this wraps errors received mid-stream as SSE
errorevents.The code carries the backend's error classification (e.g.
UPSTREAM_OVERLOADED) so clients can take targeted action without parsing the message string.