infiniflow/ragflow · error · ConnectorValidationError
Unexpected GitHub error (status={e.status}): {e.data}
Error message
Unexpected GitHub error (status={e.status}): {e.data} What it means
ConnectorValidationError catch-all for GithubException statuses other than 401/403/404: it wraps the raw status and e.data payload so the caller sees exactly what GitHub returned. Typical statuses are 422, 5xx, or 403 variants that slipped past earlier handling.
Source
Thrown at common/data_source/github/connector.py:754
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:
raise Exception(f"Unexpected error during GitHub settings validation: {exc}")
def validate_checkpoint_json(self, checkpoint_json: str) -> GithubConnectorCheckpoint:
return GithubConnectorCheckpoint.model_validate_json(checkpoint_json)
def retrieve_slim_document(
self,
start: SecondsSinceUnixEpoch | None = None,
end: SecondsSinceUnixEpoch | None = None,
callback: Any = None,
) -> GenerateSlimDocumentOutput:
start_value = 0.0 if start is None else start
end_value = datetime.now(timezone.utc).timestamp() if end is None else end
checkpoint = self.build_dummy_checkpoint()
slim_batch: list[SlimDocument] = []
View on GitHub (pinned to 554fb1133a)
Solutions
- Read the embedded status and e.data — the GitHub error message names the actual cause.
- For 5xx or secondary-limit 403s, back off (exponential, respect Retry-After) and revalidate later.
- Upgrade PyGithub if the payload shows an unrecognized/changed error shape.
Defensive patterns
Strategy: retry
Try / catch
try:
connector.validate_connector_settings()
except ConnectorValidationError as e:
if is_transient_github_status(e): # inspect wrapped status (5xx, secondary limits)
schedule_retry_with_backoff()
else:
return 400, str(e) Prevention
- Inspect the embedded status/e.data before choosing retry vs fail.
- Respect Retry-After headers and use exponential backoff for 5xx responses.
When it happens
Trigger: GitHub API probe returns an unexpected status — server errors (5xx), 422 validation responses, or abuse/secondary-limit 403s whose body lacks the SSO text — hitting the final else branch of the status ladder.
Common situations: Transient GitHub incidents; secondary rate limits reported as 403 with a different message; API changes returning new status codes to older PyGithub versions.
Related errors
- Unexpected error during GitHub settings validation: {exc}
- WhatsApp session is not running.
- Failed to create memory
- Invalid ${PLATFORM_CONFIG[gitPlatform].name} URL format
- Failed to create sandbox instance: {str(e)}
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/e36e5c3035d1ed9d.
Report an issue: GitHub.