home-assistant/core · error · ConfigEntryAuthFailed

{err}

Error message

{err}

What it means

ConfigEntryAuthFailed(err) raised by the Aladdin Connect coordinator when self.client.get_doors() fails with aiohttp.ClientResponseError of status 400-499. A 4xx from the Aladdin API almost always means the bearer token was rejected or the request is unauthorized, so HA marks the entry for re-auth instead of retrying.

Source

Thrown at homeassistant/components/aladdin_connect/coordinator.py:49

    ) -> None:
        """Initialize the coordinator."""
        super().__init__(
            hass,
            logger=_LOGGER,
            config_entry=entry,
            name="Aladdin Connect Coordinator",
            update_interval=SCAN_INTERVAL,
        )
        self.client = client

    @override
    async def _async_update_data(self) -> dict[str, GarageDoor]:
        """Fetch data from the Aladdin Connect API."""
        try:
            doors = await self.client.get_doors()
        except aiohttp.ClientResponseError as err:
            if 400 <= err.status < 500:
                raise ConfigEntryAuthFailed(err) from err
            raise UpdateFailed(f"Error communicating with API: {err}") from err
        except aiohttp.ClientError as err:
            raise UpdateFailed(f"Error communicating with API: {err}") from err

        return {door.unique_id: door for door in doors}

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Follow HA's re-auth prompt for the Aladdin Connect entry.
  2. Confirm login works in the official app.
  3. If it was a transient 4xx (rare), reloading the integration re-runs setup and token validation.
  4. Update HA / the aladdin-connect library if the API contract changed.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    doors = await client.get_doors()
except aiohttp.ClientResponseError as err:
    if 400 <= err.status < 500:
        raise ConfigEntryAuthFailed(err) from err
    raise UpdateFailed(f"Error communicating with API: {err}") from err
except aiohttp.ClientError as err:
    raise UpdateFailed(f"Error communicating with API: {err}") from err

Prevention

When it happens

Trigger: Coordinator refresh hitting the API with an expired/invalid access token that the wrapper did not refresh, or a genuinely bad request (invalid door id) returning 4xx.

Common situations: Token revoked server-side; account credentials rotated; API contract change making a previously valid request 400/404.

Related errors


AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14). Data as JSON: /api/errors/e86c1d81924e764b. Report an issue: GitHub.