hyperliquid-dex / hyperliquid-rust-sdk

MIT License
68 stars 49 forks source link

When using websockets, the user should also be sent the Errors #45

Closed Frixoe closed 2 months ago

Frixoe commented 3 months ago

Right now, some errors cause a panic in the websocket data parsing thread while others just keep going(ReaderDataNotFound). This behaviour doesn't allow the user to react to the errors. It simply requires a full reset of the thread but the user doesn't even know when the error occurs because it's only being logged and not sent to the user.