informalsystems / tendermint-rs

Client libraries for Tendermint/CometBFT in Rust!
Apache License 2.0
587 stars 213 forks source link

WS Subscription Events Silently Dropped on Parse Error #1399

Open ryanrossiter opened 3 months ago

ryanrossiter commented 3 months ago

What went wrong?

When using the WebSocketClient to subscribe to events, if the event cannot be parsed into a JSON RPC event due to a deserialization error, the event is silently ignored. This is then difficult to debug why events aren't being received.

Steps to reproduce

Subscribe to a TM 37 chain using the TM 34 compatibilty mode, which will cause event parsing to fail since the events won't be decodable from base64.

Definition of "done"

Event parsing errors should be relayed to the subscriber to handle.

romac commented 3 months ago

Agreed, we should indeed forward such errors to subscribers. Would you be willing to open a PR to address this?