node-jsonrpc2 icon indicating copy to clipboard operation
node-jsonrpc2 copied to clipboard

"Error" field in response is not JSON RPC 2.0 compliant

Open phrenciuc opened this issue 8 years ago • 2 comments

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.

phrenciuc avatar Jan 22 '17 16:01 phrenciuc

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

pocesar avatar Jan 24 '17 13:01 pocesar

when you think that the patch will be available ?

giovannigenna avatar Mar 06 '17 10:03 giovannigenna