If the server responds with a valid JSON RPC response, containing an error (e.g. see below), the client does not recognise this, and continues to attempt to decode the empty result field.
{ "jsonrpc": "2.0", "error": { "code": -32603, "message": "JWT Token is expired" } }
On receipt of an error like this, I'd like the endpoint to return a nil result (the JSON RPC spec says that Error and Result cannot co-exist in a response) and an error. It might also be useful to have a server option that can allow the error to be mapped to a different error type, or perhaps swallowed altogether.
If the server responds with a valid JSON RPC response, containing an error (e.g. see below), the client does not recognise this, and continues to attempt to decode the empty result field.
{ "jsonrpc": "2.0", "error": { "code": -32603, "message": "JWT Token is expired" } }On receipt of an error like this, I'd like the endpoint to return a nil result (the JSON RPC spec says that Error and Result cannot co-exist in a response) and an error. It might also be useful to have a server option that can allow the error to be mapped to a different error type, or perhaps swallowed altogether.