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

  1. Refresh the access_token (enterprise tokens expire ~2 hours) and re-run load_credentials
  2. Check the embedded {e} in the message and the logged stack for the specific DingTalk error code
  3. Confirm the DingTalk app has the Notable/AITable read scope and the operator_id has access to table_id
  4. 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

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


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/7f0e1e618cec0a23. Report an issue: GitHub.