From f3aea5e6ecbb4e13101fb56e3dd17303b4b50b81 Mon Sep 17 00:00:00 2001 From: Josh Roy <10731363+JRoy@users.noreply.github.com> Date: Mon, 11 Oct 2021 15:06:18 -0400 Subject: [PATCH] Improve error message for updater checker rate limit (#4560) Fixes #4556 --- .../com/earth2me/essentials/updatecheck/UpdateChecker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/updatecheck/UpdateChecker.java b/Essentials/src/main/java/com/earth2me/essentials/updatecheck/UpdateChecker.java index a56e3f945..2c39cace0 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/updatecheck/UpdateChecker.java +++ b/Essentials/src/main/java/com/earth2me/essentials/updatecheck/UpdateChecker.java @@ -147,8 +147,8 @@ public final class UpdateChecker { // Locally built? return new RemoteVersion(BranchStatus.UNKNOWN); } - if (connection.getResponseCode() == HttpURLConnection.HTTP_INTERNAL_ERROR) { - // Github is down + if (connection.getResponseCode() == HttpURLConnection.HTTP_INTERNAL_ERROR || connection.getResponseCode() == HttpURLConnection.HTTP_FORBIDDEN) { + // GitHub is down or we hit a local rate limit return new RemoteVersion(BranchStatus.ERROR); }