infiniflow/ragflow · error · ConnectorValidationError
DingTalk Notable credential validation failed: {e}
Error message
DingTalk Notable credential validation failed: {e} What it means
Raised by validate_connector_settings() when the get_all_sheets_with_options SDK call throws any exception. The full stack is logged ('[DingTalk Notable]: Failed to validate credentials') and the original message is embedded in a ConnectorValidationError. Typical causes: expired/invalid access token (DingTalk tokens expire in ~2h), missing operator_id permissions, wrong table_id/unionId, or network failure.
Source
Thrown at common/data_source/dingtalk_ai_table_connector.py:142
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")
raise ConnectorValidationError(f"DingTalk Notable credential validation failed: {e}")
def _get_all_sheets(self) -> list[dict[str, Any]]:
"""
Retrieve all sheets from the Notable table.
Returns:
List of sheet information dictionaries
"""
headers = notable_models.GetAllSheetsHeaders()
headers.x_acs_dingtalk_access_token = self._access_token
request = notable_models.GetAllSheetsRequest(
operator_id=self.operator_id,
)
try:
response = self.client.get_all_sheets_with_options(
self.table_id,View on GitHub (pinned to 554fb1133a)
Solutions
- Refresh the access_token (enterprise tokens expire ~2 hours) and re-run load_credentials
- Check the embedded {e} in the message and the logged stack for the specific DingTalk error code
- Confirm the DingTalk app has the Notable/AITable read scope and the operator_id has access to table_id
- Verify table_id and operator_id values against the DingTalk AITable console
Defensive patterns
Strategy: retry
Try / catch
try:
connector.validate_connector_settings()
except ConnectorValidationError as e:
if 'expired' in str(e).lower():
connector.load_credentials({'access_token': fetch_new_token()})
connector.validate_connector_settings() # retry once Prevention
- Fetch DingTalk access tokens programmatically per run instead of caching past expiry (~2h)
- Log the DingTalk error code embedded in {e} before retrying — permission errors are not retriable
When it happens
Trigger: Expired access_token (they are short-lived); operator_id lacks read permission on the Notable base; table_id references a deleted base; Tea/TeaUtil SDK exceptions surfaced as generic Exception.
Common situations: Tokens cached too long in automation; DingTalk app scopes (AITable/Notable permissions) not granted; base shared with a different org.
Related errors
- Unexpected S3 client error (code={error_code}, status={statu
- Unexpected error while validating Confluence settings: {e}
- DingTalk access_token is required
- DingTalk Notable
- Unexpected error during Dropbox settings validation: {e}
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/7f0e1e618cec0a23.
Report an issue: GitHub.