mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 17:59:39 +02:00
log error if JSONRPC fails
This commit is contained in:
parent
8f2b761361
commit
17e45fd2ab
1 changed files with 6 additions and 2 deletions
|
@ -30,9 +30,13 @@ public class Rpc {
|
|||
|
||||
private void processResponse() throws JsonSyntaxException {
|
||||
String jsonResponse = dcJsonrpcInstance.getNextResponse();
|
||||
Response response = gson.fromJson(jsonResponse, Response.class);
|
||||
|
||||
if (response == null || response.id == 0) { // Got JSON-RPC notification/event, ignore
|
||||
Response response = gson.fromJson(jsonResponse, Response.class);
|
||||
if (response == null) {
|
||||
Log.e(TAG, "Error parsing JSON: " + jsonResponse);
|
||||
return;
|
||||
} else if (response.id == 0) {
|
||||
// Got JSON-RPC notification/event, ignore
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue