-
-
Notifications
You must be signed in to change notification settings - Fork 425
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Effect is running?
@effect/rpc: "0.71.1"
What steps can reproduce the bug?
See https://github.com/Effect-TS/effect/blob/main/packages/rpc/src/RpcSerialization.ts#L159, specifically the decodeJsonRpcRaw function.
When decoded is an Array, this function always returns an empty array (messages) and the code in the last line Array.isArray(decoded) ? decoded.map(decodeJsonRpcMessage) : [decodeJsonRpcMessage(decoded)] becomes unreachable.
What is the expected behavior?
Decoded messages should not be lost
What do you see instead?
When decoding JSON-RPC batch requests (arrays), all decoded messages are lost
Additional information
This can be tested by sending an Array of requests in a single HTTP Request to the RPC endpoint with RpcSerialization.layerJsonRpc({})
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working