blocto / solana-go-sdk

Solana Golang SDK
https://blocto.github.io/solana-go-sdk/
MIT License
366 stars 95 forks source link

[chore] remove unecessary prefix #96

Closed halink0803 closed 1 year ago

halink0803 commented 1 year ago

Solana return the response under the structure of

{
  "code":-32009,
  "message":"Slot 135999228 was skipped, or missing in long-term storage",
  "data":null
}

Adding unnecessary prefix make it impossible to parse the error response to object and hard to check the error. Remove the prefix make is easier to work with error response.

yihau commented 1 year ago

Thanks for the feedback. Just open a PR #97, I think it can solve this problem. IMO, I prefer to return the error directly instead of have a custom function to parse it. wdyt?

halink0803 commented 1 year ago

Thanks for the feedback. Just open a PR #97, I think it can solve this problem. IMO, I prefer to return the error directly instead of have a custom function to parse it. wdyt?

Yes, I also prefer to have the error return directly.