Closed patricoferris closed 1 year ago
Currently a lot of our interfaces don't do a great job of error handling. In the best case scenario at the moment we throw an error, in the worst case a good result could be a string and a bad result could be a string that says "Error: e.g.
string
"Error:
https://github.com/carboncredits/x4c/blob/84a058ac8de6c4c104b247b48251340ccae9ecd5/cli/src/x4c/CustodianContract.ts#L147
Unfortunately, this then propagates all the way up as far as assuming we made a successful retirement but in fact we didn't.
I propose we either:
Any thoughts @mdales ?
With the changes to use Go etc. we're in a much better position w.r.t to error handling, happy to close this now
Currently a lot of our interfaces don't do a great job of error handling. In the best case scenario at the moment we throw an error, in the worst case a good result could be a
string
and a bad result could be astring
that says"Error:
e.g.https://github.com/carboncredits/x4c/blob/84a058ac8de6c4c104b247b48251340ccae9ecd5/cli/src/x4c/CustodianContract.ts#L147
Unfortunately, this then propagates all the way up as far as assuming we made a successful retirement but in fact we didn't.
I propose we either:
Any thoughts @mdales ?