Skip to content

Commit 49bbf93

Browse files
committed
fix stream error
1 parent a60df0b commit 49bbf93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/xl-ai/src/streamTool/callLLMWithStreamTools.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ function partialObjectStreamThrowError<PARTIAL>(
270270
case "finish":
271271
break;
272272
case "error":
273-
throw chunk.error;
273+
controller.error(chunk.error);
274+
break;
274275
default: {
275276
const _exhaustiveCheck: never = chunk;
276277
throw new Error(`Unsupported chunk type: ${_exhaustiveCheck}`);

0 commit comments

Comments
 (0)