Merge pull request #2857 from ThatGamerBlue/whoopsie

session: handle uuid parsing failure
This commit is contained in:
ThatGamerBlue
2020-11-12 03:35:23 +00:00
committed by GitHub

View File

@@ -59,9 +59,17 @@ class SessionClient
try (Response response = okHttpClient.newCall(request).execute())
{
ResponseBody body = response.body();
InputStream in = body.byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), UUID.class);
InputStream in = body.byteStream();
try
{
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), UUID.class);
}
catch (IllegalArgumentException ex)
{
ex.printStackTrace();
return null;
}
}
});
}