Skip to content
This repository has been archived by the owner on Aug 8, 2018. It is now read-only.

jsonrpc: error objects #17

Open
heikoheiko opened this issue Jun 11, 2015 · 2 comments
Open

jsonrpc: error objects #17

heikoheiko opened this issue Jun 11, 2015 · 2 comments

Comments

@heikoheiko
Copy link
Member

looks like we don't return proper errors yet. e.g. when not finding a filter.

http://www.jsonrpc.org/specification#error_object

@debris wrote:
[11.06.15 15:08:58] there is also some proposal, regarding errors:
https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal
[11.06.15 15:09:23] it's not yet implemented in cpp, but I think that go supports most of this errors

@hackaugusto
Copy link

eth_call is missing compliance:

  • the eth_call uses data_encoder [ https://github.com/ethereum/pyethapp/blob/develop/pyethapp/jsonrpc.py#L1091 ]
  • Upon transaction failure the function call that implements the JSON RPC method returns False [ https://github.com/ethereum/pyethapp/blob/develop/pyethapp/jsonrpc.py#L1156 ]
  • And the data_encoder cannot handle bool only str and unicode [ https://github.com/ethereum/pyethapp/blob/develop/pyethapp/jsonrpc.py#L391 ]

The proper return should be roughly:

{
    code: 3,
    message: 'Execution error',
    data: [{
        code: 104,
        message: 'Rejected',
        reason: 'Execution error'
    }]
}

@RomanZacharia
Copy link

Addressed here #161

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

No branches or pull requests

4 participants