| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #7939: "fix: add error handling to RPC system to prevent crashes on session abort" Why it's related: This PR addresses the same underlying issue of handling errors during session abort to prevent crashes. Both PRs target the scenario where a session abort races with in-flight requests, though PR #7939 focuses on the RPC system while PR #7959 (current) targets the TUI prompt component specifically. |
Sorry, something went wrong.
When aborting a session with double-escape, the abort races with the in-flight prompt request. If the response is incomplete or empty, the SDK's JSON parser throws "Unexpected end of JSON input". Adding .catch() silences this expected error during abort, matching the pattern used elsewhere for session.abort() calls. Fixes anomalyco#7946 Co-Authored-By: Claude <noreply@anthropic.com>
|
@zerone0x this will be handled upstream, not sure if your change is still relevant after that hey-api/hey-api#3202 |
Sorry, something went wrong.
|
Closing 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. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fixes #7946
When aborting a session with double-escape (pressing Esc twice), the session.abort() call races with the in-flight session.prompt() request. If the server terminates the response mid-stream, the response body is incomplete or empty, causing the SDK's JSON parser to throw SyntaxError: Unexpected end of JSON input.
Changes
This matches the existing pattern used in routes/session/index.tsx:400 and app/src/pages/session.tsx:577 for the same scenario.
Test plan
🤖 Generated with Claude Code