Skip to content

Commit

Permalink
fix: handle streaming errors (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas2D authored Apr 11, 2024
1 parent d1a55e7 commit 7cba0a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api/streaming-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ export function createStreamingApiClient(clientOptions: {
);
return;
}
if (message.event === 'error') {
onError(new HttpError(result));
return;
}

outputStream.push(result);
},
Expand Down

0 comments on commit 7cba0a7

Please sign in to comment.