This commit is contained in:
Ankush Bose 2025-06-10 10:17:48 +02:00 committed by GitHub
commit 00fb5c0dae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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