rjr icon indicating copy to clipboard operation
rjr copied to clipboard

Error object spec non-compliance

Open ssimeonov opened this issue 10 years ago • 1 comments

The response parsing code in https://github.com/movitto/rjr/blob/master/lib/rjr/messages/response.rb#L73 expects that error.class is available in the case of error responses. The spec mandates that any additional error information is kept in error.data.

ssimeonov avatar May 17 '14 01:05 ssimeonov

Ah good catch, hadn't realized that. We could leave error_class as is though as a RJR-specific thing, such as w/ the generic json-rpc headers, allowing the client to specify the contents of error_data when appropriate. Or could just simplify it and use error_data to store the class (and remove the later).

Am fine w/ either, will create an issue to keep track of the change.

movitto avatar May 17 '14 06:05 movitto