Skip to content

Commit 2d511fe

Browse files
authored
Improve error message for updater checker rate limit (EssentialsX#4560)
Fixes EssentialsX#4556
1 parent cbe7840 commit 2d511fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Essentials/src/main/java/com/earth2me/essentials/updatecheck/UpdateChecker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ private RemoteVersion fetchDistance(final String head, final String hash) {
147147
// Locally built?
148148
return new RemoteVersion(BranchStatus.UNKNOWN);
149149
}
150-
if (connection.getResponseCode() == HttpURLConnection.HTTP_INTERNAL_ERROR) {
151-
// Github is down
150+
if (connection.getResponseCode() == HttpURLConnection.HTTP_INTERNAL_ERROR || connection.getResponseCode() == HttpURLConnection.HTTP_FORBIDDEN) {
151+
// GitHub is down or we hit a local rate limit
152152
return new RemoteVersion(BranchStatus.ERROR);
153153
}
154154

0 commit comments

Comments
 (0)