Repository navigation
fix(jsonrpc): keep id as null in error responses - #1880
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 38 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
bmuddha
left a comment
There was a problem hiding this comment.
Please replace the full RPC integration test with a focused encoder unit test.
When the request id can't be read, for example on a malformed body over HTTP or WebSocket, the error response leaves out
identirely becauseResponseErrorPayloadskips it when it isNone. JSON-RPC 2.0 requiresidon every response and says it must benullin that case, and Agave sends"id":null. The fallback body inserver/http/dispatch.rsalready does this, so only the normal path disagreed.Dropping the
skip_serializing_ifmakesNoneserialize asnull; responses with a known id are unchanged. Addedtest_parse_error_response_has_null_idinaperture/tests/batches.rs, which posts{and checks the response has"id": null.