Improve error message for updater checker rate limit (#4560)

Fixes #4556
This commit is contained in:
Josh Roy 2021-10-11 15:06:18 -04:00 committed by GitHub
parent a7a1fcd98c
commit f3aea5e6ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}