Repository navigation
fix(http): return HTTP 200 for dispatched INVALID_PARAMS - #3872
Muzaqil555 wants to merge 1 commit into
Conversation
…n Streamable HTTP
|
This PR has been closed automatically. This repo only keeps pull requests open when they come from a maintainer, or from a contributor a maintainer has assigned to the linked issue, and you aren't currently assigned to #3855. If a maintainer assigns you to #3855, this PR reopens on its own and there's nothing more you need to do here. Assignment is a maintainer call based on capacity; comments that only ask to be assigned don't factor in. What does help is engaging on the issue itself by confirming the repro, explaining why it matters for your use case, or describing the approach you'd take. You're welcome to keep pushing commits here (just avoid force-pushing, since GitHub can't reopen a rewritten branch), but that on its own won't get the PR reviewed or the issue assigned, and realistically most auto-closed PRs stay closed. There's no need to open a new PR either way. CONTRIBUTING.md has the full reasoning, but in short:
Maintainers: reopen, remove |
|
Thanks for the implementation. I think there is one important gap in the origin classification.
This is also reflected in the new Could you add an end-to-end regression test for invalid typed tool arguments that pass the envelope ladder but fail Thanks! |
|
Thanks for pointing out the typed-parameter path. I pushed the follow-up to the existing branch. The transport now selects HTTP status at the dispatch boundary. The wire tests cover |
Fixes #3855.
Motivation and Context
In modern Streamable HTTP, a malformed request envelope can produce JSON-RPC
INVALID_PARAMSwith HTTP 400. If the request passes inbound validation and dispatch rejects its typed parameters, the same JSON-RPC error belongs in the reply on HTTP 200.The transport selects the status table where it writes the response. Inbound rejections use the validation table. Dispatched responses use the table of HTTP statuses specified for that path. This also covers Pydantic validation raised by
ServerRunner, and preserves explicitly defined statuses such as 404 forMETHOD_NOT_FOUND.How Has This Been Tested?
INVALID_PARAMSon HTTP 200. A malformed required_metaenvelope returns HTTP 400../scripts/testpassed with 6,235 passed, 8 skipped, and 1 expected failure. Coverage was 100% andstrict-no-coverpassed. The run excluded the workspace's proxy variables so localhost tests could run directly.Breaking Changes
Clients that treated dispatched
INVALID_PARAMSas an HTTP 400 now receive the JSON-RPC error in an HTTP 200 response on the modern transport.Types of changes
Checklist
help wanted, or I'm a maintainer)Additional context
AI assistance was used to prepare and verify the follow-up. The branch tip with the follow-up is
fa85c7a.