Errors delivered from the LCD have a bunch of text wrapping the actual error message. We should deliver JSON error messages so clients can read the error and display it to the user.
@faboweb can you attach an example of existing and desired output/error example?
Current:
checkTx failed: (262245) Msg 0 failed: === ABCI Log ===
Codespace: 4
Code: 101
ABCICode: 262245
Error: --= Error =--
Data: common.FmtError{format:"validator for this address is currently revoked", args:[]interface {}(nil)}
Msg Traces:
--= /Error =--
=== /ABCI Log ===
Expected:
{
"code": 1,
"abci_code": 262245,
"message": "checkTx failed: validator for this address is currently revoked"
}
@cosmos/cosmos-ui any other recommendations?
Thanks @faboweb !
I'm totally approve this. Parsing each distinct error msg completely avoidable
Implemented in types/errors.go #L247
Most helpful comment
Current:
Expected: