Skip to content

fix(core): distinguish invalid requests from malformed JSON - #1661

Closed
bilboquet wants to merge 1 commit into
paritytech:masterfrom
bilboquet:fix/1660-invalid-request-error
Closed

bilboquet wants to merge 1 commit into
paritytech:masterfrom
bilboquet:fix/1660-invalid-request-error

Conversation

@bilboquet

Copy link
Copy Markdown
Contributor

Fixes #1660.

Validate JSON syntax before extracting the request ID, so valid JSON with an invalid request envelope returns InvalidRequest. Add helper and HTTP/WebSocket regressions and correct existing expectations.

Validation: baseline regression fails before the fix; 16 core and 20 distinct server tests pass in release, offline. Formatting and targeted all-features/all-targets Clippy pass; Clippy reports an existing unused lifetime in server.rs.

@lexnv

lexnv commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Should we close this in favour of #1662?

@bilboquet

Copy link
Copy Markdown
Contributor Author

yes, we can close this one.
sorry I forgot to separate commits

@bilboquet bilboquet closed this Oct 20, 2026
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.

server: wrong-version JSON-RPC objects without an ID return Parse error

2 participants