node-jsonrpc2
node-jsonrpc2 copied to clipboard
"Error" field in response is not JSON RPC 2.0 compliant
First of all congrats for this great extension!
Trying to send some details about the error to the client, I found out that the "error" field in response is automatically casted to string ( see. connection.js:104 ), although the "error" field in JSON RPC 2.0 should be an object (see http://www.jsonrpc.org/specification#error_object ) with "message", "code" and "data" subfields.
indeed @phrenciuc, the canonical errors (and error codes) were introduced in a patch but they wasn't implemented (although they ARE passed to the error handler), but the code and the data fields are indeed dropped
when you think that the patch will be available ?