Skip to content
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

Wrap errors correctly so that users get readable transaction failures #325

Open
jkilpatr opened this issue Sep 1, 2021 · 0 comments
Open
Labels
First Issue This is a good first issue Gravity Module cosmos sdk module help wanted Extra attention is needed Nice To Have Nice to have but don't spend too much time here.

Comments

@jkilpatr
Copy link
Member

jkilpatr commented Sep 1, 2021

https://github.com/althea-net/cosmos-gravity-bridge/pull/323/files

The content of this pr is an example of an error type that would not be returned correctly to the user. In the before case the user would see an 'unknown internal error' in the response for their transaction if they hit this error case.

If the error is wrapped properly the user will see the error message in the 'raw_log' section of the tx response, greatly easing debugging.

There are many instances in the codebase of this mistake, and the above example pr only corrects one of them. This ticket is for the rest.

@jkilpatr jkilpatr added help wanted Extra attention is needed Gravity Module cosmos sdk module Nice To Have Nice to have but don't spend too much time here. First Issue This is a good first issue labels Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First Issue This is a good first issue Gravity Module cosmos sdk module help wanted Extra attention is needed Nice To Have Nice to have but don't spend too much time here.
Projects
None yet
Development

No branches or pull requests

1 participant