You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec mandates that responses must include either result or error but not both. The code in https://github.com/movitto/rjr/blob/master/lib/rjr/messages/response.rb#L62 does not reflect this. As a result, for example, RJR talking to a JSON-RPC 1.x server will interpret an error response as a success with nil result.
The text was updated successfully, but these errors were encountered:
Hey thanks for reaching out. Am a bit confused by the target specification which you are refering to with this issue, 2.0 or 1.x.
In the 2.0 case if result is set and there is no error, response.success will be true and response.error false as intended. If the error is set and result is missing from the response, response.success will be false and response.error true.
This is also the case w/ all the 1.1 versions, the only one which seems to differ is 1.0 where if an error occurs 'result' will be returned as null and if no error occurs 'error' will be returned as null. In this case yes RJR will not behave as expected since the response will have the null 'result' key on errors.
RJR currently advertises only JSON-RPC 2.0 compatibilty right now, but I'd be down to include 1.x support. Just not sure what other differences are entailed between the versions. Something that you might know / know where to find offhand?
The spec mandates that responses must include either
result
orerror
but not both. The code in https://github.com/movitto/rjr/blob/master/lib/rjr/messages/response.rb#L62 does not reflect this. As a result, for example, RJR talking to a JSON-RPC 1.x server will interpret an error response as a success withnil
result.The text was updated successfully, but these errors were encountered: