wrap-cli icon indicating copy to clipboard operation
wrap-cli copied to clipboard

Client: Throw Less Errors

Open dOrgJelli opened this issue 3 years ago • 0 comments

In the JS client + core libraries, we throw errors. This is a hard error handling method to develop against, because you do not know what functions will throw and which will not. Treating all functions as "throwable" is not very realistic.

Instead we can adopt a better strategy, return wrapped result + error objects (aka Result<T>).

This is a well known development practice that we use in all of our wasm languages.

dOrgJelli avatar Jul 05 '22 22:07 dOrgJelli