Compare commits

...

3 commits

Author SHA1 Message Date
Ankush Bose
bb5a879d6c
Merge f96a5edbb9 into f1f4e8baff 2025-03-20 13:12:22 +00:00
Ankush Bose
f96a5edbb9
5120: Put back unwanted changes 2022-12-18 15:37:11 +05:30
Ankush Bose
cc115f1e76
5120: Fix image item loading in ExploreFragment
- removed redundant try block containing checker with `rsp.body` instead of using peekBody, resulting in closing the connection before even reading it.
2022-12-18 15:33:29 +05:30

View file

@ -95,9 +95,7 @@ public final class OkHttpConnectionFactory {
if (rsp.isSuccessful()) {
try (final ResponseBody responseBody = rsp.peekBody(ERRORS_PREFIX.length())) {
if (ERRORS_PREFIX.equals(responseBody.string())) {
try (final ResponseBody body = rsp.body()) {
throw new IOException(body.string());
}
throw new IOException(responseBody.string());
}
} catch (final IOException e) {
// Log the error as debug (and therefore, "expected") or at error level