Skip to content

Commit 717b9db

Browse files
committed
Update ConnectionUtils.java
1 parent ad8e67f commit 717b9db

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/io/github/intisy/utils/utils/ConnectionUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ public static JsonObject handleResponse(HttpURLConnection connection) throws IOE
152152
throw new IOException("Failed to parse JSON: " + e.getMessage());
153153
}
154154
if (responseCode != HttpURLConnection.HTTP_OK) {
155-
throw new IOException("Response code: " + responseCode + " response: " + jsonObject.toString());
155+
Log.error("Response code: " + responseCode + " response: " + jsonObject.toString());
156156
}
157+
jsonObject.addProperty("code", responseCode);
157158
br.close();
158159
return jsonObject;
159160
}

0 commit comments

Comments
 (0)