We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As a developer interfacing with the Koinos API via JSONRPC, I would like error responses to not contain stringified JSON.
e.g. Koinos Chain can return an error response that looks like this:
{"jsonrpc":"2.0","error":{"code":-32603,"message":"contract does not exist","data":"{\"code\":102}"},"id":1} (koinos/koinos-chain#677)
{"jsonrpc":"2.0","error":{"code":-32603,"message":"contract does not exist","data":"{\"code\":102}"},"id":1}
The problem is the "data":"{\"code\":102}"}. In order to programmatically interact with data, JSON must be parsed again.
"data":"{\"code\":102}"}
data
We can change the proto error_response to better hold this data.
error_response
message error_response { string message = 1; map<string, google.protobuf.Any> data = 2; }
Then, in jsonrpc, we can parse data and convert it to a golang map that can be encoded in json.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As a developer interfacing with the Koinos API via JSONRPC, I would like error responses to not contain stringified JSON.
e.g. Koinos Chain can return an error response that looks like this:
{"jsonrpc":"2.0","error":{"code":-32603,"message":"contract does not exist","data":"{\"code\":102}"},"id":1}
(koinos/koinos-chain#677)The problem is the
"data":"{\"code\":102}"}
. In order to programmatically interact withdata
, JSON must be parsed again.We can change the proto
error_response
to better hold this data.Then, in jsonrpc, we can parse
data
and convert it to a golang map that can be encoded in json.The text was updated successfully, but these errors were encountered: