You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a few places in the code don't check errors they just generate. This for example caused me to lose half an hour debugging code since I accidentally passed an address instead of private key and the code forgot to assert the error wasn't nil. Some examples of this:
an error is not checked and it didn't catch the server backend API returned a message that wasn't compatible with JSON (sent a separate email about that).
The text was updated successfully, but these errors were encountered:
Thanks as always for the error report @ThePiachu; ended up doing a rather large refactor of the way errors are handled. The upshot is that every call that has an error should be explicitly handled, and it will include the response body information (e.g. your TX Skeleton in the /txs/send) in addition to the proper errors.
I noticed a few places in the code don't check errors they just generate. This for example caused me to lose half an hour debugging code since I accidentally passed an address instead of private key and the code forgot to assert the error wasn't nil. Some examples of this:
https://github.com/blockcypher/gobcy/blob/master/tx.go#L146
https://github.com/blockcypher/gobcy/blob/master/gobcy.go#L130
Similarly, here:
https://github.com/blockcypher/gobcy/blob/master/gobcy.go#L62
an error is not checked and it didn't catch the server backend API returned a message that wasn't compatible with JSON (sent a separate email about that).
The text was updated successfully, but these errors were encountered: