This commit is contained in:
Nicolás Sánchez 2025-03-12 10:29:42 -03:00
parent 8344b38749
commit 2e4b0ec0a6
1 changed files with 14 additions and 2 deletions

View File

@ -548,7 +548,13 @@ public class EarnerInterface {
System.err.println("The parsed JSON response is not a JsonObject.");
return null;
}
return jsonElement.getAsJsonObject();
JsonObject jsonObject = jsonElement.getAsJsonObject();
if (jsonObject.has("Error")) {
System.err.println("The parsed JSON response contains Error");
return jsonObject;
}
return jsonObject;
}
}
@ -570,7 +576,13 @@ public class EarnerInterface {
System.err.println("The parsed JSON response is not a JsonObject.");
return null;
}
return jsonElement.getAsJsonObject();
JsonObject jsonObject = jsonElement.getAsJsonObject();
if (jsonObject.has("Error")) {
System.err.println("The parsed JSON response contains Error");
return jsonObject;
}
return jsonObject;
}
}