{"record":{"id":"1cbba8e35197fb53","repo":"infiniflow/ragflow","slug":"dingtalk-notable","errorCode":null,"errorMessage":"DingTalk Notable","messagePattern":"DingTalk Notable","errorType":"validation","errorClass":"ConnectorMissingCredentialError","httpStatus":null,"severity":"error","filePath":"common/data_source/dingtalk_ai_table_connector.py","lineNumber":123,"sourceCode":"\n    @property\n    def client(self) -> NotableClient:\n        \"\"\"Get the DingTalk AITable client.\"\"\"\n        if self._client is None:\n            raise DingTalkAITableClientNotSetUpError()\n        return self._client\n\n    @property\n    def access_token(self) -> str:\n        \"\"\"Get the access token.\"\"\"\n        if self._access_token is None:\n            raise ConnectorMissingCredentialError(\"DingTalk access_token not loaded\")\n        return self._access_token\n\n    def validate_connector_settings(self) -> None:\n        \"\"\"Validate DingTalk connector settings by trying to get all sheets.\"\"\"\n        if self._client is None or self._access_token is None:\n            raise ConnectorMissingCredentialError(\"DingTalk Notable\")\n\n        try:\n            # Try to get sheets to validate credentials\n            headers = notable_models.GetAllSheetsHeaders()\n            headers.x_acs_dingtalk_access_token = self._access_token\n\n            request = notable_models.GetAllSheetsRequest(\n                operator_id=self.operator_id,\n            )\n\n            self.client.get_all_sheets_with_options(\n                self.table_id,\n                request,\n                headers,\n                util_models.RuntimeOptions(),\n            )\n        except Exception as e:\n            logger.exception(\"[DingTalk Notable]: Failed to validate credentials\")","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/dingtalk_ai_table_connector.py#L105-L141","documentation":"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.","triggerScenarios":"Calling validate_connector_settings() on a connector constructed directly (no load_credentials), or after a failed credential load left _client/_access_token unset.","commonSituations":"Admin UI 'Validate' clicked before credentials saved; connector instantiated in a health-check endpoint without the credential step.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if connector._client is None or connector._access_token is None:\n    raise RuntimeError('call load_credentials before validating DingTalk connector')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["In UI flows, enable Validate only after credentials are saved","Standardize connector lifecycle: construct -> load_credentials -> validate -> index"],"tags":["dingtalk","credentials","validation","lifecycle"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}