infiniflow/ragflow · warning · UnexpectedValidationError
Validation failed due to GitHub rate-limits being exceeded.
Error message
Validation failed due to GitHub rate-limits being exceeded. Please try again later.
What it means
UnexpectedValidationError raised when any GitHub probe inside validate_connector_settings() hits RateLimitExceededException. It is deliberately a different class from ConnectorValidationError: rate limiting says nothing about whether the settings are correct, so callers should treat it as transient and retry rather than reject the config.
Source
Thrown at common/data_source/github/connector.py:738
if MISSING_SSO_ERROR_MESSAGE in str(e).lower():
SSO_GUIDE_LINK = (
"https://docs.github.com/en/enterprise-cloud@latest/authentication/"
"authenticating-with-saml-single-sign-on/"
"authorizing-a-personal-access-token-for-use-with-saml-single-sign-on"
)
raise ConnectorValidationError(
f"Your GitHub token is missing authorization to access the `{self.repo_owner}` organization. Please follow the guide to authorize your token: {SSO_GUIDE_LINK}"
)
# If not an org, try as a user
user = self.github_client.get_user(self.repo_owner)
# Check if we can access any repos
total_count = user.get_repos().totalCount
if total_count == 0:
raise ConnectorValidationError(f"Found no repos for user: {self.repo_owner}. Does the credential have the right scopes?")
except RateLimitExceededException:
raise UnexpectedValidationError("Validation failed due to GitHub rate-limits being exceeded. Please try again later.")
except GithubException as e:
if e.status == 401:
raise CredentialExpiredError("GitHub credential appears to be invalid or expired (HTTP 401).")
elif e.status == 403:
raise InsufficientPermissionsError("Your GitHub token does not have sufficient permissions for this repository (HTTP 403).")
elif e.status == 404:
if self.repositories:
if "," in self.repositories:
raise ConnectorValidationError(f"None of the specified GitHub repositories could be found for owner: {self.repo_owner}")
else:
raise ConnectorValidationError(f"GitHub repository not found with name: {self.repo_owner}/{self.repositories}")
else:
raise ConnectorValidationError(f"GitHub user or organization not found: {self.repo_owner}")
else:
raise ConnectorValidationError(f"Unexpected GitHub error (status={e.status}): {e.data}")
except Exception as exc:View on GitHub (pinned to 554fb1133a)
Solutions
- Wait for the rate-limit window to reset (check X-RateLimit-Reset / gh api rate_limit) and validate again.
- Reduce validation frequency — cache the 'valid' verdict instead of revalidating each save.
- Use a token with a higher limit (GitHub App installation tokens: 15k req/hr) and avoid parallel validations with the same token.
Defensive patterns
Strategy: retry
Validate before calling
rl = gh.get_rate_limit().core
if rl.remaining == 0:
wait_until(rl.reset.timestamp()) Try / catch
for attempt in range(3):
try:
connector.validate_connector_settings()
break
except UnexpectedValidationError:
time.sleep(2 ** attempt) # rate limit is transient; settings may be fine Prevention
- Cache successful validation results instead of revalidating on every save.
- Deduplicate concurrent validations sharing one token; check rate_limit before probing.
When it happens
Trigger: Unauthenticated or secondary-rate limits tripped during validation — get_repo/get_contents/get_organization calls — typically when the same token runs frequent validations, CI loops, or indexing concurrently.
Common situations: Shared CI token across many jobs; validation retried in a tight loop; token already exhausted by a large indexing run; GitHub secondary rate limits from bursty API use.
Related errors
- Invalid ${PLATFORM_CONFIG[gitPlatform].name} URL format
- GitHub search returned no items.
- GitHub credentials not loaded.
- Invalid connector settings: 'repo_owner' must be provided.
- Invalid connector settings: No valid repository names provid
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/4117baca34570dd1.
Report an issue: GitHub.