{"record":{"id":"380bbeeb1e06b92e","repo":"infiniflow/ragflow","slug":"unexpected-error-during-dropbox-settings-validatio","errorCode":null,"errorMessage":"Unexpected error during Dropbox settings validation: {e}","messagePattern":"Unexpected error during Dropbox settings validation: (.+?)","errorType":"validation","errorClass":"ConnectorValidationError","httpStatus":null,"severity":"error","filePath":"common/data_source/dropbox_connector.py","lineNumber":55,"sourceCode":"        self.dropbox_client = Dropbox(access_token)\n        return None\n\n    def validate_connector_settings(self) -> None:\n        \"\"\"Validate Dropbox connector settings\"\"\"\n        if self.dropbox_client is None:\n            raise ConnectorMissingCredentialError(\"Dropbox\")\n\n        try:\n            self.dropbox_client.files_list_folder(path=\"\", limit=1)\n        except AuthError as e:\n            logger.exception(\"[Dropbox]: Failed to validate Dropbox credentials\")\n            raise ConnectorValidationError(f\"Dropbox credential is invalid: {e}\")\n        except ApiError as e:\n            if e.error is not None and \"insufficient_permissions\" in str(e.error).lower():\n                raise InsufficientPermissionsError(\"Your Dropbox token does not have sufficient permissions.\")\n            raise ConnectorValidationError(f\"Unexpected Dropbox error during validation: {e.user_message_text or e}\")\n        except Exception as e:\n            raise ConnectorValidationError(f\"Unexpected error during Dropbox settings validation: {e}\")\n\n    def _download_file(self, path: str) -> bytes:\n        \"\"\"Download a single file from Dropbox.\"\"\"\n        if self.dropbox_client is None:\n            raise ConnectorMissingCredentialError(\"Dropbox\")\n        _, resp = self.dropbox_client.files_download(path)\n        return resp.content\n\n    def _get_shared_link(self, path: str) -> str:\n        \"\"\"Create a shared link for a file in Dropbox.\"\"\"\n        if self.dropbox_client is None:\n            raise ConnectorMissingCredentialError(\"Dropbox\")\n\n        try:\n            shared_links = self.dropbox_client.sharing_list_shared_links(path=path)\n            if shared_links.links:\n                return shared_links.links[0].url\n","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/dropbox_connector.py#L37-L73","documentation":"Catch-all raised by validate_connector_settings() when files_list_folder throws anything other than AuthError/ApiError: network timeouts, DNS failures, SSL errors, rate limiting surfaced as generic exceptions. The original exception text is embedded; e.user_message_text is not available on this path, so raw {e} is shown.","triggerScenarios":"Connector host cannot reach api.dropboxapi.com (firewall, proxy, VPN); TLS interception with an untrusted CA; transient 429/5xx wrapped by the SDK.","commonSituations":"Self-hosted Onenyx behind an egress proxy; corporate MITM certificates; sandboxed CI without network access.","solutions":["Inspect the embedded {e}: connection/SSL errors point to network egress, not credentials","Test reachability: curl -v https://api.dropboxapi.com/2/files/list_folder from the connector host","Add the proxy CA to the host trust store or configure HTTPS_PROXY for the connector process","If transient (rate limit), retry validation after a backoff"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"import requests\nrequests.head('https://api.dropboxapi.com', timeout=5)  # fail early on egress problems","typeGuard":null,"tryCatchPattern":"try:\n    connector.validate_connector_settings()\nexcept ConnectorValidationError as e:\n    if is_transient(str(e)):  # timeout / rate limit heuristics\n        time.sleep(backoff)\n        connector.validate_connector_settings()\n    else:\n        raise","preventionTips":["Verify egress to api.dropboxapi.com from the connector host during deployment","Distinguish network errors (retryable) from credential errors (not retryable) in handling code"],"tags":["dropbox","network","validation","catch-all"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}