home-assistant/core · error · ConfigEntryNotReady
cannot_connect
Error message
cannot_connect
What it means
Raised as ConfigEntryNotReady (translation key cannot_connect) when Azure Blob Storage setup fails with a generic AzureError that is neither ResourceNotFoundError nor ClientAuthenticationError. It covers transient/service-level failures (network drops, 5xx from the storage service, throttling). HA retries setup with backoff.
Source
Thrown at homeassistant/components/azure_storage/__init__.py:74
)
try:
if not await container_client.exists():
await container_client.create_container()
except ResourceNotFoundError as err:
raise ConfigEntryError(
translation_domain=DOMAIN,
translation_key="account_not_found",
translation_placeholders={CONF_ACCOUNT_NAME: entry.data[CONF_ACCOUNT_NAME]},
) from err
except ClientAuthenticationError as err:
raise ConfigEntryAuthFailed(
translation_domain=DOMAIN,
translation_key="invalid_auth",
translation_placeholders={CONF_ACCOUNT_NAME: entry.data[CONF_ACCOUNT_NAME]},
) from err
except AzureError as err:
raise ConfigEntryNotReady(
translation_domain=DOMAIN,
translation_key="cannot_connect",
translation_placeholders={CONF_ACCOUNT_NAME: entry.data[CONF_ACCOUNT_NAME]},
) from err
entry.runtime_data = container_client
def _async_notify_backup_listeners() -> None:
for listener in hass.data.get(DATA_BACKUP_AGENT_LISTENERS, []):
listener()
entry.async_on_unload(entry.async_on_state_change(_async_notify_backup_listeners))
return True
async def async_unload_entry(
hass: HomeAssistant, entry: AzureStorageConfigEntryView on GitHub (pinned to 58a3fdb3ea)
Solutions
- Wait for the automatic retry; if it persists, verify network connectivity to the storage endpoint
- Check the Azure status page for incidents in the storage account's region
- If throttling (429), reduce concurrent backup/upload operations or raise limits
- If a proxy is required, ensure HTTP_PROXY/HTTPS_PROXY are configured for the HA process
Defensive patterns
Strategy: retry
Type guard
def is_transient_azure_error(err: BaseException) -> bool:
from azure.core.exceptions import AzureError, ClientAuthenticationError, ResourceNotFoundError
return isinstance(err, AzureError) and not isinstance(err, (ResourceNotFoundError, ClientAuthenticationError)) Try / catch
try:
await container_client.exists()
except (ResourceNotFoundError, ClientAuthenticationError):
raise
except AzureError as err:
raise ConfigEntryNotReady(...) from err # retried with backoff Prevention
- Order except clauses most-specific first, as the integration does
- Rely on ConfigEntryNotReady backoff for transient Azure errors instead of manual loops
- Keep the SDK's built-in retry policy enabled
When it happens
Trigger: container_client.exists() or create_container() raises any other azure.core.exceptions.AzureError subclass, e.g. ServiceResponseError on network failure or HttpResponseError with a 5xx/429 status.
Common situations: Temporary network/DNS outage between the HA host and <account>.blob.core.windows.net, storage service throttling (too many requests), Azure regional incident.
Related errors
- Timeout during backup operation in {func.__name__}
- account_not_found
- invalid_auth
- Error during backup operation in {func.__name__}: Status {er
- Error during backup operation in {func.__name__}: {err}
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/c3e002668e7031ec.
Report an issue: GitHub.