Summary
Response-shaped messages (has id, no method) are silently dropped in the transport layer. Per JSON-RPC 2.0 spec, the server should return -32600 INVALID_REQUEST.
Details
- Messages with
id but no method are silently discarded in both sync and async transports.
- Fix: return
INVALID_REQUEST (-32600) for these messages. Keep silent discard only for messages with no id (stale sampling responses).
- Depends on: structured
TransportError enum (makes the codec vs invalid-request distinction expressible without string-matching) and malformed protocol E2E tests.
Summary
Response-shaped messages (has
id, nomethod) are silently dropped in the transport layer. Per JSON-RPC 2.0 spec, the server should return-32600 INVALID_REQUEST.Details
idbut nomethodare silently discarded in both sync and async transports.INVALID_REQUEST (-32600)for these messages. Keep silent discard only for messages with noid(stale sampling responses).TransportErrorenum (makes the codec vs invalid-request distinction expressible without string-matching) and malformed protocol E2E tests.