GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: gracefully handle invalid json response by pschiel · Pull Request #8104 · anomalyco/opencode

Conversation

@pschiel

@pschiel pschiel commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #7889

Cause:

Aborting requests (e.g., pressing ESC during streaming responses) can result in an empty response body.
The SDK client's JSON parser fails on empty strings with "Unexpected end of JSON input" because there was no error handling.

Fix: add error handling.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pschiel
fix: gracefully handle invalid json response
d334da5
@github-actions

github-actions Bot commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Found potential duplicate PRs:

Related PRs (addressing similar/same issue):

  1. PR fix: handle empty JSON responses in sdk client #8027 - "fix: handle empty JSON responses in sdk client"

    • Directly addresses empty JSON response handling in the SDK client
  2. PR fix(storage): handle empty JSON files gracefully #7888 - "fix(sdk): handle empty JSON response bodies gracefully"

    • Specifically targets empty JSON response bodies gracefully, which matches the fix description
  3. PR fix(tui): handle JSON parse error on double-escape abort #7959 - "fix(tui): handle JSON parse error on double-escape abort"

    • Handles JSON parse errors on abort scenarios, related to the ESC abort streaming issue
  4. PR fix: add error handling to RPC system to prevent crashes on session abort #7939 - "fix: add error handling to RPC system to prevent crashes on session abort"

    • Related to session abort handling

Why they're related: PR #8104 fixes JSON parsing errors on empty responses from aborted requests. PRs #8027 and #7888 appear to address the exact same issue (empty JSON responses), while #7959 and #7939 address related abort scenarios that can produce invalid responses.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pschiel
pschiel marked this pull request as ready for review January 13, 2026 01:16
@pschiel pschiel closed this Jan 13, 2026
@mrlubos

mrlubos commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

@pschiel this will be fixed upstream hey-api/hey-api#3202

pschiel reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhruvkej9

dhruvkej9 commented Jan 13, 2026

Copy link
Copy Markdown

@pschiel this will be fixed upstream hey-api/openapi-ts#3202

When ?? I can't use opencode due to this

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mrlubos

mrlubos commented Jan 17, 2026

Copy link
Copy Markdown
Contributor

@dhruvkej9

NOW!!

dhruvkej9 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

SDK throws 'Unexpected end of JSON input' on empty response bodies

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@pschiel @mrlubos @dhruvkej9
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.