[Bug] JSON-RPC: RequestPacket
serializes only the request portion, not the entire JSON-RPC request
#15
Labels
bug
Something isn't working
Component
json-rpc
What version of Alloy are you on?
latest
Operating System
macOS (Apple Silicon)
Describe the bug
When serializing a single
RequestPacket
, only therequest
part of theSerializedRequest
is serialized, and doesn't the include the id or method. This means that an invalid request is created as no id or method is sent. This leads to the errorError response: ErrorPayload { code: -32600, message: "Invalid json-rpc request", data: None }
The fix I found was to add a new
Payload
struct that contains theid
,method
andparams
and serialize that.The text was updated successfully, but these errors were encountered: