Skip to content

[codex] Use shared app-server JSON-RPC error helpers#21221

Merged
pakrym-oai merged 1 commit intomainfrom
pakrym/app-server-internal-error-helper
May 5, 2026
Merged

[codex] Use shared app-server JSON-RPC error helpers#21221
pakrym-oai merged 1 commit intomainfrom
pakrym/app-server-internal-error-helper

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

@pakrym-oai pakrym-oai commented May 5, 2026

Why

App-server had repeated hand-built JSON-RPC error objects for standard error shapes. Using the shared helpers keeps the common invalid_request, invalid_params, and internal_error construction in one place and reduces the chance of new call sites drifting from the common error payload shape.

What changed

  • Replaced manual standard JSON-RPC error object creation with internal_error(...), invalid_request(...), and invalid_params(...) across app-server request processors and runtime paths.
  • Removed local duplicate helper definitions from search and review request handling.
  • Preserved existing structured data payloads by creating the shared helper error first and then attaching the existing metadata.
  • Left custom non-standard errors and raw error-code assertions intact.

Validation

  • cargo test -p codex-app-server

@pakrym-oai pakrym-oai changed the title [codex] Use shared app-server internal error helper [codex] Use shared app-server JSON-RPC error helpers May 5, 2026
@pakrym-oai pakrym-oai force-pushed the pakrym/app-server-internal-error-helper branch from d2b49ce to baaea52 Compare May 5, 2026 18:44
@pakrym-oai pakrym-oai marked this pull request as ready for review May 5, 2026 19:07
@pakrym-oai pakrym-oai merged commit b6d4c4e into main May 5, 2026
26 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/app-server-internal-error-helper branch May 5, 2026 19:14
@github-actions github-actions Bot locked and limited conversation to collaborators May 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants