Skip to content

fix(opencode): declare BadRequest on remaining HttpApi group routes - #8

Merged
TimothyVang merged 1 commit into
mainfrom
agent/m12-http-error-contracts
Jul 9, 2026
Merged

fix(opencode): declare BadRequest on remaining HttpApi group routes#8
TimothyVang merged 1 commit into
mainfrom
agent/m12-http-error-contracts

Conversation

@TimothyVang

Copy link
Copy Markdown
Owner

Summary

  • Declares presentation-only error: contracts on HttpApi endpoints that still lacked them after PRs fix(opencode): declare file http query errors #4fix(opencode): declare BadRequest on event + instance read routes #7 (file, session, provider, project-copy, event, instance).
  • Priority groups: experimental (capabilities, session, resource) and tui (open/control routes + showToast).
  • Also covers remaining gaps in config, global, mcp, permission, project, pty, question, sync, and workspace.
  • Style matches file.ts / provider.ts (HttpApiError.BadRequest); project.directories also declares existing ProjectNotFoundError.

Verify

cd packages/opencode && bun run typecheck
# $ tsgo --noEmit  (exit 0)

Test plan

  • Scan all groups/*.ts for HttpApiEndpoint without error: (0 remaining after this PR)
  • bun install + bun run typecheck in packages/opencode (pass)
  • Pre-push monorepo turbo typecheck (29/29 packages)
  • CI green on PR

Presentation-only error contracts for experimental, tui, and other
groups still missing error fields after PRs #4#7. Matches file/provider
style; project.directories also declares ProjectNotFoundError.
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@TimothyVang
TimothyVang merged commit 45b0674 into main Jul 9, 2026
7 of 9 checks passed
@TimothyVang
TimothyVang deleted the agent/m12-http-error-contracts branch July 9, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant