-
-
Notifications
You must be signed in to change notification settings - Fork 101
Description
hello folks,
Description
I'm implementing a json-rpc v1.0 server but I found a problem with the protocol specification.
As reported in the v1.0 protocol specification, both 'result' and 'error' attributes must be defined in responses, and them must be null if not used.
result - The Object that was returned by the invoked method. This must be null in case there was an error invoking the method.
error - An Error object if there was an error invoking the method. It must be null if there was no error.
Steps to Reproduce
- I create a tests json-rpc server with this code
- I simulate a json-rpc client with curl
curl --header "Content-Type: application/json" --header "Accept: application/json" -d '{"method":"sum_all", "id": "curltest", "params": [0, 1.1, 345, 1e-06]}' http://localhost:4000/
- the result of the call does not have the attribute 'error'
{"id": "curltest", "result": 346.100001}
Expected behavior: I would expect the output
{"id": "curltest", "result": 346.100001, "error": null}
Actual behavior: as reported before:
{"id": "curltest", "result": 346.100001}
Reproduces how often: every time
Versions
- Python 3.5.3
- Debian GNU/Linux 9
- json-rpc==1.13.0
Additional Information
None
Thank you!