fix(cli): align stream error handling after output-mode merge
Follow up on #1740/#1741 by typing terminal SSE errors in the SDK, classifying them as server.error in the CLI/MCP, marking Projector done on error frames, attaching session_id to MCP stream failures, and migrating the e2e chat step to the bounded JSON envelope.
This commit is contained in:
+2
-2
@@ -321,7 +321,7 @@ func (c *Client) KnowledgeQAStream(
|
||||
return err
|
||||
}
|
||||
if streamResponse.ResponseType == ResponseTypeError && streamResponse.Done {
|
||||
return fmt.Errorf("SSE stream error: %s", streamResponse.Content)
|
||||
return NewSSEStreamError(streamResponse.Content)
|
||||
}
|
||||
dataBuffer = ""
|
||||
eventType = ""
|
||||
@@ -396,7 +396,7 @@ func (c *Client) ContinueStream(
|
||||
return err
|
||||
}
|
||||
if streamResponse.ResponseType == ResponseTypeError && streamResponse.Done {
|
||||
return fmt.Errorf("SSE stream error: %s", streamResponse.Content)
|
||||
return NewSSEStreamError(streamResponse.Content)
|
||||
}
|
||||
dataBuffer = ""
|
||||
eventType = ""
|
||||
|
||||
Reference in New Issue
Block a user