Open GoogleCodeExporter opened 9 years ago
This gets solved with this snippet
On JSONRPCHttpClient.java @ doJSONRequest method (line 117)
if (!jsonError.equals(null)) {
JSONObject errorObj = jsonResponse.getJSONObject("error");
int code = errorObj.getInt("code");
if (code >= -32099 && code <= -32000)
return jsonResponse;
else
throw new JSONRPCException(jsonResponse.get("error"));
}
And handled in JSONRPCClient.java @ callJSONObject method (line 524)
try {
if (response.has("result")) {
return new JSONObject(response.getString("result"));
} else{
return new JSONObject(response.getString("error"));
}
} catch (NumberFormatException e1) {
throw new JSONRPCException("Cannot convert result to JSONObject", e);
} catch (JSONException e1) {
throw new JSONRPCException("Cannot convert result to JSONObject", e);
}
Original comment by oneil...@gmail.com
on 17 Feb 2014 at 2:47
Original issue reported on code.google.com by
oneil...@gmail.com
on 17 Feb 2014 at 2:02Attachments: