infiniflow/ragflow · error · ConnectorMissingCredentialError
DingTalk Notable
Error message
DingTalk Notable
What it means
Raised by validate_connector_settings() when either the Notable client or the access token is None. It is the defensive pre-check before the SDK round-trip, so validation fails fast with a credential error rather than an AttributeError inside the DingTalk SDK.
Source
Thrown at common/data_source/dingtalk_ai_table_connector.py:123
@property
def client(self) -> NotableClient:
"""Get the DingTalk AITable client."""
if self._client is None:
raise DingTalkAITableClientNotSetUpError()
return self._client
@property
def access_token(self) -> str:
"""Get the access token."""
if self._access_token is None:
raise ConnectorMissingCredentialError("DingTalk access_token not loaded")
return self._access_token
def validate_connector_settings(self) -> None:
"""Validate DingTalk connector settings by trying to get all sheets."""
if self._client is None or self._access_token is None:
raise ConnectorMissingCredentialError("DingTalk Notable")
try:
# Try to get sheets to validate credentials
headers = notable_models.GetAllSheetsHeaders()
headers.x_acs_dingtalk_access_token = self._access_token
request = notable_models.GetAllSheetsRequest(
operator_id=self.operator_id,
)
self.client.get_all_sheets_with_options(
self.table_id,
request,
headers,
util_models.RuntimeOptions(),
)
except Exception as e:
logger.exception("[DingTalk Notable]: Failed to validate credentials")View on GitHub (pinned to 554fb1133a)
Solutions
- Run load_credentials({'access_token': ...}) before validate_connector_settings()
- In UI flows, disable the Validate button until a token is saved
- Reuse the same lifecycle as the indexing path: construct -> load_credentials -> validate
Defensive patterns
Strategy: validation
Validate before calling
if connector._client is None or connector._access_token is None:
raise RuntimeError('call load_credentials before validating DingTalk connector') Prevention
- In UI flows, enable Validate only after credentials are saved
- Standardize connector lifecycle: construct -> load_credentials -> validate -> index
When it happens
Trigger: Calling validate_connector_settings() on a connector constructed directly (no load_credentials), or after a failed credential load left _client/_access_token unset.
Common situations: Admin UI 'Validate' clicked before credentials saved; connector instantiated in a health-check endpoint without the credential step.
Related errors
- Blob storage credentials not loaded.
- Box
- DingTalk access_token is required
- DingTalk access_token not loaded
- Dropbox
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/1cbba8e35197fb53.
Report an issue: GitHub.