Uh oh!
There was an error while loading. Please reload this page.
fix: handle prompt abort to prevent JSON parse crash - #8025
Conversation
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found two potentially related PRs:
These PRs appear to be addressing the same or very similar issue—handling crashes that occur when prompt/session cancellation happens and results in empty or unparseable data. PR #8025 should be reviewed against these to ensure consistency or to determine if they're duplicate efforts. |
f1ae801 to
08fa7f7CompareClosing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Fixes#7946
When cancel() rejects the prompt callback, the stream closes without writing anything. SDK then crashes parsing empty body.
This catches the rejection and writes null instead.
Couldn't reproduce locally but the fix seems correct based on the code flow.