home-assistant/core · warning · UpdateFailed

Error communicating with API: {err}

Error message

Error communicating with API: {err}

What it means

Raised as UpdateFailed by the Autoskope DataUpdateCoordinator when get_vehicles() (or the post-reauth retry path's transient failures surface here) raises CannotConnect. UpdateFailed makes the DataUpdateCoordinator log the message and schedule the next normal refresh; entity state stays stale but the entry is not broken.

Source

Thrown at homeassistant/components/autoskope/coordinator.py:60

        """Fetch data from API endpoint."""
        try:
            vehicles = await self.api.get_vehicles()
            return {vehicle.id: vehicle for vehicle in vehicles}

        except InvalidAuth:
            # Attempt to re-authenticate using stored credentials
            try:
                await self.api.authenticate()
                # Retry the request after successful re-authentication
                vehicles = await self.api.get_vehicles()
                return {vehicle.id: vehicle for vehicle in vehicles}
            except InvalidAuth as reauth_err:
                raise ConfigEntryAuthFailed(
                    f"Authentication failed: {reauth_err}"
                ) from reauth_err

        except CannotConnect as err:
            raise UpdateFailed(f"Error communicating with API: {err}") from err

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. If transient, no action — the coordinator retries on the next interval.
  2. If persistent, test connectivity to the Autoskope API from the HA host and check for firewall/proxy interference.
  3. Consider raising the coordinator's update interval or timeout if latency is consistently near the limit.
Defensive patterns

Strategy: retry

Try / catch

from homeassistant.helpers.update_coordinator import UpdateFailed

try:
    await coordinator.async_config_entry_first_refresh()
except UpdateFailed as err:
    # first refresh failed on connectivity; entities show unavailable and next interval retries
    LOGGER.warning("Autoskope refresh failed: %s", err)

Prevention

When it happens

Trigger: A periodic refresh loses network connectivity to the Autoskope API mid-operation: timeout, dropped connection, DNS blip, or server 5xx mapped to CannotConnect by the API wrapper.

Common situations: Intermittent Wi-Fi on the HA host; Autoskope cloud brief outage; high latency causing timeouts on every scan; restrictive router/NAT dropping long-lived connections.

Related errors


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