JSON-RPC Errors
If there is some problem with a JSON-RPC request, such as in this request:
{
"jsonrpc": "2.0",
"method": "add",
"params": [
1,
2
],
"id": 1
}
you will get a JSON-RPC response with an error instead of a result, as:
{
"id": 1,
"error": {
"message": "Invalid params",
"code": -32602
},
"jsonrpc": "2.0"
}