From c26ae9597da58955a8718ae83def67d83df2236b Mon Sep 17 00:00:00 2001 From: Asutorufa <16442314+Asutorufa@users.noreply.github.com> Date: Fri, 7 Mar 2025 17:48:57 +0800 Subject: [PATCH] fix: return scanner error when stream connection unexpectedly disconnects Signed-off-by: Asutorufa <16442314+Asutorufa@users.noreply.github.com> --- api/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/client.go b/api/client.go index 3dffce600..c1d5233a8 100644 --- a/api/client.go +++ b/api/client.go @@ -189,7 +189,7 @@ func (c *Client) stream(ctx context.Context, method, path string, data any, fn f } } - return nil + return scanner.Err() } // GenerateResponseFunc is a function that [Client.Generate] invokes every time