-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Standarize REST errors response msgs #2445
Comments
6 tasks
This is a great proposal! Lets adopt! |
here's another example of the
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
Create a standard value for error messages in REST responses
Problem Definition
Even thought the new object format makes it easier to get each of the components of an error (eg:
codespace
,code
,abci_code
, andmessage
) Currently clients have to parse the content of themessage
value to get the desired format. For example:This is caused by a series of added messages to the error, such as
fmt.Sprintf("checkTx failed: %s", err.Error())
Ref to voyager issue for parsing Errors: luniehq/lunie#1131
Ref to user feedback issue about the same problem: #1892
Proposal
utils.WriteErrorResponse(w http.ResponseWriter, status int, msg string)
as the desired format for errors"message":"Error{checkTx failed; out of gas in location: WritePerByte}"
For Admin Use
The text was updated successfully, but these errors were encountered: