-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support returning error
types from a realm
#416
Comments
Related with #439 |
Hi @moul. I wonder if this is related to a question we have. In GnoMobile, if BroadcastTxCommit, returns an error in For example when we try to register a user without enough "send", it returns the string "payment must not be less than 200000000". In GnoMobile, we would like to return an error code, but it is not ideal to have to match an error message string. (This example is realm-specific, but even language-level errors like nil pointer are just returned as strings.) I ask this question in this issue because maybe the validator can return a meaningful error type. Are there plans for that? |
I propose an hybrid approach:
|
Today, it returns a string representation of the pointer.
It should instead return a structure that can be processed dynamically, containing as much helpful information as possible.
The ultimate goal is to start having official typed errors that can be used by wallets and frontends to react differently, i.e., supporting "redirect errors".
The text was updated successfully, but these errors were encountered: