-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Invalid JSON RPC 2.0 error responses #29
Comments
Hello, By default the version is "1.0", in line[1] remove key "error" by response, and in lines[2][3][4][5] Do you have any example with this problem? Thank you. [1] - flask-jsonrpc/flask_jsonrpc/site.py Line 253 in 723db17
[2] - flask-jsonrpc/flask_jsonrpc/site.py Line 203 in 723db17
[3] - flask-jsonrpc/flask_jsonrpc/site.py Line 234 in 723db17
[4] - flask-jsonrpc/flask_jsonrpc/site.py Line 241 in 723db17
[5] - flask-jsonrpc/flask_jsonrpc/site.py Line 248 in 723db17
|
Hello,
Yes! It's a problem. Thank you. |
Fixed in version 0.3. Thank you. |
Some errors cause response objects that violate the JSON RPC 2.0 spec, because they have both, a "result" and "error" member set. An example would be MethodNotFoundError.
See https://github.com/cenobites/flask-jsonrpc/blob/723db17b1ef11d15d4180fd0e372b9a51723f4e4/flask_jsonrpc/site.py#L186-195 .
It seems that the version is initialized to late in the marked block and early exceptions are handled with the JSON RPC 1.0 spec, because the version_hint is always "1.0".
The text was updated successfully, but these errors were encountered: