{"record":{"id":"47d9d109eaa375ce","repo":"home-assistant/core","slug":"unable-to-fetch-data-err","errorCode":null,"errorMessage":"Unable to fetch data: {err}","messagePattern":"Unable to fetch data: (.+?)","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"error","filePath":"homeassistant/components/airthings/coordinator.py","lineNumber":45,"sourceCode":"        config_entry: AirthingsConfigEntry,\n    ) -> None:\n        \"\"\"Initialize the coordinator.\"\"\"\n        super().__init__(\n            hass,\n            _LOGGER,\n            config_entry=config_entry,\n            name=DOMAIN,\n            update_method=self._update_method,\n            update_interval=SCAN_INTERVAL,\n        )\n        self.airthings = airthings\n\n    async def _update_method(self) -> dict[str, AirthingsDevice]:\n        \"\"\"Get the latest data from Airthings.\"\"\"\n        try:\n            return await self.airthings.update_devices()  # type: ignore[no-any-return]\n        except AirthingsError as err:\n            raise UpdateFailed(f\"Unable to fetch data: {err}\") from err\n","sourceCodeStart":27,"sourceCodeEnd":46,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/airthings/coordinator.py#L27-L46","documentation":"UpdateFailed raised by the Airthings cloud coordinator when airthings.update_devices() raises AirthingsError — any failure talking to the Airthings cloud API (auth token issues classified by the library as generic, network errors, or API errors). The coordinator marks the update failed and retries on the SCAN_INTERVAL schedule.","triggerScenarios":"update_devices() raises AirthingsError: expired/invalid client credentials, Airthings API outage or 5xx, request timeout, or malformed response from the API during the periodic poll.","commonSituations":"Airthings cloud incident, API client id/secret revoked, rate limiting from aggressive polling, or network egress problems from the Home Assistant host.","solutions":["Check Airthings status page / whether the Airthings app works.","Verify the API client credentials used by the integration are still valid.","Confirm Home Assistant outbound HTTPS access to the Airthings API.","Wait for the next coordinator cycle — transient failures recover automatically.","Update the airthings library/integration if the API changed."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"def is_airthings_update_failed(err: Exception) -> bool:\n    return isinstance(err, UpdateFailed) and str(err).startswith(\"Unable to fetch data\")","tryCatchPattern":"try:\n    await coordinator.async_refresh()\nexcept UpdateFailed as err:\n    if isinstance(err.__cause__, AirthingsError):\n        # cloud-side or transient: back off, next scheduled poll will retry\n        _LOGGER.debug(\"Airthings refresh failed, will retry: %s\", err)","preventionTips":["Keep Airthings API credentials (client id/secret) current and revoke-aware.","Do not shorten SCAN_INTERVAL below the API's rate guidance.","Check the Airthings status page before debugging locally when failures start suddenly."],"tags":["home-assistant","airthings","cloud-api","coordinator"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}