Trying to prevent error #580

Merged
greg6775 merged 1 commit from greg-dev into master 2020-11-19 00:52:17 +01:00
Showing only changes of commit 56a52b2763 - Show all commits

View file

@ -59,9 +59,14 @@ public class Rethink {
try { try {
return new JSONObject(response); return new JSONObject(response);
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); insertUser(id);
System.out.println(response); String response2 = String.valueOf(r.table(table).get(id).toJson().run(conn).first());
return null; try {
return new JSONObject(response2);
} catch (JSONException ex) {
ex.printStackTrace();
return null;
}
} }
} }