Lunie: Parse LCD errors in the lcdClient

Created on 14 Aug 2018  路  11Comments  路  Source: luniehq/lunie

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.

high priority

Most helpful comment

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

All 11 comments

Check with SDK team about changing the output.

SDK issue: cosmos/cosmos-sdk#2044

Closed by cosmos/cosmos-sdk#2119

Why was this reopened?

@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

Sorry this was the result of #1192

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

closed by cosmos/cosmos-sdk#2444

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

Should that be a new issue?

One item of the scope is not meet:

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jrmoreau picture jrmoreau  路  4Comments

Bitcoinera picture Bitcoinera  路  4Comments

nylira picture nylira  路  3Comments

faboweb picture faboweb  路  3Comments

faboweb picture faboweb  路  3Comments