{"record":{"id":"22f3592bce706107","repo":"infiniflow/ragflow","slug":"azure-blob-container-not-found-msg-300","errorCode":null,"errorMessage":"Azure Blob: container not found: {msg[:300]}","messagePattern":"Azure Blob: container not found: (.+?)","errorType":"validation","errorClass":"ConnectorValidationError","httpStatus":null,"severity":"error","filePath":"common/data_source/azure_blob_connector.py","lineNumber":195,"sourceCode":"\n    def validate_connector_settings(self) -> None:\n        if self._container_client is None:\n            raise ConnectorMissingCredentialError(\"Azure Blob\")\n\n        try:\n            # get_container_properties() costs one API call; it returns\n            # the ETag and last-modified of the container, proving both\n            # the credential and the container name are valid.\n            self._container_client.get_container_properties()\n        except Exception as exc:\n            msg = str(exc)\n            code = getattr(getattr(exc, \"error_code\", None), \"value\", None) or getattr(exc, \"error_code\", \"\")\n            if \"AuthenticationFailed\" in msg or \"InvalidAuthenticationInfo\" in msg:\n                raise ConnectorMissingCredentialError(f\"Azure Blob credential rejected: {msg[:300]}\") from exc\n            if \"AuthorizationPermissionMismatch\" in msg or \"403\" in msg:\n                raise InsufficientPermissionsError(f\"Azure Blob: insufficient permissions on container: {msg[:300]}\") from exc\n            if \"ContainerNotFound\" in msg or \"404\" in msg:\n                raise ConnectorValidationError(f\"Azure Blob: container not found: {msg[:300]}\") from exc\n            raise UnexpectedValidationError(f\"Azure Blob validation failed ({code}): {msg[:300]}\") from exc\n\n    # ------------------------------------------------------------------\n    # Checkpoint helpers\n    # ------------------------------------------------------------------\n\n    def build_dummy_checkpoint(self) -> AzureBlobCheckpoint:\n        return AzureBlobCheckpoint(has_more=True)\n\n    def validate_checkpoint_json(self, checkpoint_json: str) -> AzureBlobCheckpoint:\n        try:\n            return AzureBlobCheckpoint.model_validate_json(checkpoint_json)\n        except Exception:\n            return self.build_dummy_checkpoint()\n\n    # ------------------------------------------------------------------\n    # Core data loading\n    # ------------------------------------------------------------------","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/azure_blob_connector.py#L177-L213","documentation":"Raised by validate_connector_settings when get_container_properties() returns 'ContainerNotFound' or a 404. Authentication succeeded; the container named in the credentials simply does not exist on that storage account. Mapped to ConnectorValidationError, distinguishing it from credential problems.","triggerScenarios":"container_name points at a container that was deleted, renamed (containers cannot be renamed in Azure), never created, or contains a typo/case mismatch — Azure container names are case-sensitive and must be lowercase.","commonSituations":"Environment mismatch (dev container name used against prod account), container deleted between connector configuration and validation, or a trailing slash / uppercase letters accidentally included in the name.","solutions":["Verify the exact container name in the Azure portal (names are lowercase, 3-63 chars)","Check you are pointing at the right storage account — the account in account_url/connection_string must own that container","If the container was deleted, recreate it or point the connector at the current one"],"exampleFix":"# before\ncreds = {..., \"container_name\": \"My-Container\"}\n\n# after\ncreds = {..., \"container_name\": \"my-container\"}","handlingStrategy":"validation","validationCode":"import re\nCONTAINER_RE = re.compile(r\"^[a-z0-9](?!.*--)[a-z0-9-]{1,61}[a-z0-9]$\")\ndef is_valid_container_name(name: str) -> bool:\n    return bool(name and CONTAINER_RE.match(name))","typeGuard":"def is_valid_container_name(name: str) -> bool:\n    return (\n        isinstance(name, str)\n        and 3 <= len(name) <= 63\n        and name == name.lower()\n        and re.fullmatch(r\"[a-z0-9-]+\", name) is not None\n        and \"--\" not in name\n    )","tryCatchPattern":"try:\n    connector.validate_connector_settings()\nexcept ConnectorValidationError as e:\n    if \"container not found\" in str(e):\n        raise ConfigError(\"check container name and storage account\") from e\n    raise","preventionTips":["Validate container names against Azure naming rules (lowercase, 3-63 chars, no consecutive dashes) before saving config","Keep environment-specific configs explicit — dev/prod container names differ by design","Run validate_connector_settings right after configuration changes, not at 3am on the schedule"],"tags":["azure","azure-blob","container","not-found","validation"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}