[PR #8027] fix: handle empty JSON responses in sdk client #12598

Open
opened 2026-02-16 18:17:29 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8027

State: open
Merged: No


Issue link:

Summary:

  • Handle empty JSON responses by falling back to {} instead of throwing.
  • Apply the fix to v1/v2 generated clients and keep it via the SDK build patch.

Motivation:

  • Some endpoints can return empty bodies, which currently triggers Unexpected end of JSON input in the desktop app.

Validation:

  • bun run typecheck (packages/sdk/js)
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8027 **State:** open **Merged:** No --- Issue link: - Fixes #8014 - https://github.com/anomalyco/opencode/issues/8014 Summary: - Handle empty JSON responses by falling back to `{}` instead of throwing. - Apply the fix to v1/v2 generated clients and keep it via the SDK build patch. Motivation: - Some endpoints can return empty bodies, which currently triggers `Unexpected end of JSON input` in the desktop app. Validation: - `bun run typecheck` (packages/sdk/js)
yindo added the pull-request label 2026-02-16 18:17:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12598