fix(server): return structured validation errors#26457
Merged
Merged
Conversation
d35105c to
9a2ad7b
Compare
3c058c7 to
6226390
Compare
9a2ad7b to
528dcf1
Compare
6226390 to
c304394
Compare
c304394 to
6e91ea0
Compare
kitlangton
added a commit
that referenced
this pull request
May 9, 2026
PR #26457 changed the 400 wire format on the HTTP API in three ways: 1. \`Effect.catch(HttpApiError.BadRequest)\` → \`{ data: {}, errors: [], success: false }\` 2. \`HttpApiSchemaError\` defect → same shape 3. \`normalizeEmptyBadRequest\` post-processor that rewrites ANY empty 400 into the same shape In v1.14.42 (post-Hono-deletion) at least one external plugin (\`opencode-gemini-auth\`, per #26546 reports) makes an HTTP API call during startup that hits one of these paths and breaks on the new body shape — the unparseable JSON ends up printed to stdout and the TUI never starts. \`opencode --pure\` works (no plugins), \`opencode run\` works (no in-process server interaction), but \`opencode\` (TUI) crashes. Revert all three changes from #26457. The default HttpApi serialization of typed errors comes back, matching v1.14.41 wire format. We can re-introduce structured validation responses behind an opt-in or contract change once plugin authors have a chance to migrate. Closes #26546.
3 tasks
katosun2
pushed a commit
to katosun2/opencode
that referenced
this pull request
May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Test
bun test --timeout 5000 test/server/httpapi-authorization.test.ts test/server/httpapi-instance.test.ts test/server/httpapi-sync.test.tsbun typecheck