Skip to content

fix: reject non-object JSON-RPC requests - #14

Open
be-student wants to merge 1 commit into
AgentPostmortem:mainfrom
be-student:codex/9-reject-non-object-rpc
Open

fix: reject non-object JSON-RPC requests#14
be-student wants to merge 1 commit into
AgentPostmortem:mainfrom
be-student:codex/9-reject-non-object-rpc

Conversation

@be-student

Copy link
Copy Markdown
Contributor

What & why

Rejects parsed JSON-RPC bodies that are not objects before dispatch, returning -32600 instead of crashing or reporting an unknown method. Closes #9.

Changes

  • Validate the top-level JSON value at the request boundary.
  • Cover null, arrays, and scalar JSON values.

Checklist

  • Focused change with a clear description
  • Ran format / lint / tests (see README)
  • Updated docs or CHANGELOG if relevant
  • Linked any related issue (e.g. Closes #123)

Validation: npm test; npm run typecheck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-object JSON-RPC bodies crash or get the wrong error code

1 participant