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

Parse LCD errors in the lcdClient #1131

Closed
faboweb opened this issue Aug 14, 2018 · 11 comments · Fixed by #1539
Closed

Parse LCD errors in the lcdClient #1131

faboweb opened this issue Aug 14, 2018 · 11 comments · Fixed by #1539

Comments

@faboweb
Copy link
Collaborator

faboweb commented Aug 14, 2018

UI Version: 0.9.4

Description:

The LCD delivers errors as some complex string that includes the actual error message. We want to show only the final error to the user. In delegation we are parsing this error already once (#1094). But it would be nice, to parse any error that is delivered in that format and only return that error message to the rest of the system, abstracting the error format away from the Voyager logic.

@faboweb
Copy link
Collaborator Author

faboweb commented Aug 14, 2018

Check with SDK team about changing the output.

@fedekunze
Copy link
Contributor

SDK issue: cosmos/cosmos-sdk#2044

@fedekunze
Copy link
Contributor

Closed by cosmos/cosmos-sdk#2119

@faboweb faboweb reopened this Sep 3, 2018
@faboweb faboweb added the discuss label Sep 3, 2018
@NodeGuy
Copy link
Contributor

NodeGuy commented Sep 3, 2018

Why was this reopened?

@fedekunze
Copy link
Contributor

fedekunze commented Sep 3, 2018

@NodeGuy we need to update the errors coming from the SDK though LCD. I created the method ABCIError() for the sdk.Error struct, but it LCD still returns error.Error(), which is different and not parseable to JSON

@faboweb
Copy link
Collaborator Author

faboweb commented Sep 3, 2018

Sorry this was the result of #1192

@fedekunze
Copy link
Contributor

fedekunze commented Sep 19, 2018

Scope:

  • Check that all errors returned by LCD are consistent in format
  • Check that all errors are returned as JSON and are parsed correctly
  • Check that errors return the appropriate HTTP status code
  • Verify that Voyager's notifications show only the msg of the error

@fedekunze
Copy link
Contributor

closed by cosmos/cosmos-sdk#2444

@faboweb
Copy link
Collaborator Author

faboweb commented Oct 30, 2018

When I try to undelegate with an existing undelegation, I still get a strange error:

[ERROR] Error while undelegating Steaks: Request failed with status code 500

@faboweb faboweb reopened this Oct 30, 2018
@faboweb faboweb removed their assignment Oct 30, 2018
@NodeGuy
Copy link
Contributor

NodeGuy commented Oct 30, 2018

Should that be a new issue?

@faboweb
Copy link
Collaborator Author

faboweb commented Oct 31, 2018

One item of the scope is not meet:

Verify that Voyager's notifications show only the msg of the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants