opencode
opencode copied to clipboard
fix: handle empty JSON responses in sdk client
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 inputin the desktop app.
Validation:
bun run typecheck(packages/sdk/js)