Skip to content

Commit

Permalink
update response code
Browse files Browse the repository at this point in the history
  • Loading branch information
JNSimba committed Sep 14, 2024
1 parent 62360c7 commit cf9e06d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ public static boolean tryHttpConnection(String host) {
int responseCode = connection.getResponseCode();
String responseMessage = connection.getResponseMessage();
connection.disconnect();
if (200 == responseCode) {
if (responseCode < 500) {
// code greater than 500 means a server-side exception.
return true;
}
LOG.warn(
Expand Down

0 comments on commit cf9e06d

Please sign in to comment.