gagliardetto / solana-go

Go SDK library and RPC client for the Solana Blockchain
Apache License 2.0
943 stars 267 forks source link

WebSocket handle function missing error handling #175

Open WankkoRee opened 8 months ago

WankkoRee commented 8 months ago

https://github.com/gagliardetto/solana-go/blob/790032bfec094566011ad551254b1df937e0a027/rpc/ws/client.go#L171-L184

message may return error when I subscribe:

{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found"},"id":7534392980301594513}

so we need to handle errors before getUint64WithOk(message, "result").

Davincible commented 7 months ago

+1 for this