infiniflow/ragflow · error · ConnectorValidationError

Azure Blob: container not found: {msg[:300]}

Error message

Azure Blob: container not found: {msg[:300]}

What it means

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.

Source

Thrown at common/data_source/azure_blob_connector.py:195

    def validate_connector_settings(self) -> None:
        if self._container_client is None:
            raise ConnectorMissingCredentialError("Azure Blob")

        try:
            # get_container_properties() costs one API call; it returns
            # the ETag and last-modified of the container, proving both
            # the credential and the container name are valid.
            self._container_client.get_container_properties()
        except Exception as exc:
            msg = str(exc)
            code = getattr(getattr(exc, "error_code", None), "value", None) or getattr(exc, "error_code", "")
            if "AuthenticationFailed" in msg or "InvalidAuthenticationInfo" in msg:
                raise ConnectorMissingCredentialError(f"Azure Blob credential rejected: {msg[:300]}") from exc
            if "AuthorizationPermissionMismatch" in msg or "403" in msg:
                raise InsufficientPermissionsError(f"Azure Blob: insufficient permissions on container: {msg[:300]}") from exc
            if "ContainerNotFound" in msg or "404" in msg:
                raise ConnectorValidationError(f"Azure Blob: container not found: {msg[:300]}") from exc
            raise UnexpectedValidationError(f"Azure Blob validation failed ({code}): {msg[:300]}") from exc

    # ------------------------------------------------------------------
    # Checkpoint helpers
    # ------------------------------------------------------------------

    def build_dummy_checkpoint(self) -> AzureBlobCheckpoint:
        return AzureBlobCheckpoint(has_more=True)

    def validate_checkpoint_json(self, checkpoint_json: str) -> AzureBlobCheckpoint:
        try:
            return AzureBlobCheckpoint.model_validate_json(checkpoint_json)
        except Exception:
            return self.build_dummy_checkpoint()

    # ------------------------------------------------------------------
    # Core data loading
    # ------------------------------------------------------------------

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Verify the exact container name in the Azure portal (names are lowercase, 3-63 chars)
  2. Check you are pointing at the right storage account — the account in account_url/connection_string must own that container
  3. If the container was deleted, recreate it or point the connector at the current one

Example fix

# before
creds = {..., "container_name": "My-Container"}

# after
creds = {..., "container_name": "my-container"}
Defensive patterns

Strategy: validation

Validate before calling

import re
CONTAINER_RE = re.compile(r"^[a-z0-9](?!.*--)[a-z0-9-]{1,61}[a-z0-9]$")
def is_valid_container_name(name: str) -> bool:
    return bool(name and CONTAINER_RE.match(name))

Type guard

def is_valid_container_name(name: str) -> bool:
    return (
        isinstance(name, str)
        and 3 <= len(name) <= 63
        and name == name.lower()
        and re.fullmatch(r"[a-z0-9-]+", name) is not None
        and "--" not in name
    )

Try / catch

try:
    connector.validate_connector_settings()
except ConnectorValidationError as e:
    if "container not found" in str(e):
        raise ConfigError("check container name and storage account") from e
    raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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