{"record":{"id":"57770def674718d4","repo":"home-assistant/core","slug":"error-communicating-with-api-err-57770d","errorCode":null,"errorMessage":"Error communicating with API: {err}","messagePattern":"Error communicating with API: (.+?)","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"error","filePath":"homeassistant/components/brunt/coordinator.py","lineNumber":78,"sourceCode":"                f\" {self.config_entry.data[CONF_USERNAME]}.\"\n            ) from exc\n\n    @override\n    async def _async_update_data(self) -> dict[str | None, Thing]:\n        \"\"\"Fetch data from the Brunt endpoint for all Things.\n\n        Error 403 is the API response for any kind of\n        authentication error (failed password or email)\n        Error 401 is the API response for things that are not\n        part of the account, could happen when a device is\n        deleted from the account.\n        \"\"\"\n        try:\n            async with timeout(10):\n                things = await self.bapi.async_get_things(force=True)\n                return {thing.serial: thing for thing in things}\n        except ServerDisconnectedError as err:\n            raise UpdateFailed(f\"Error communicating with API: {err}\") from err\n        except ClientResponseError as err:\n            if err.status == 403:\n                raise ConfigEntryAuthFailed from err\n            if err.status == 401:\n                _LOGGER.warning(\"Device not found, will reload Brunt integration\")\n                await self.hass.config_entries.async_reload(self.config_entry.entry_id)\n            raise UpdateFailed from err\n","sourceCodeStart":60,"sourceCodeEnd":86,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/brunt/coordinator.py#L60-L86","documentation":"UpdateFailed with message 'Error communicating with API: {err}' raised in _async_update_data when bapi.async_get_things(force=True) fails with ServerDisconnectedError. Related paths: 403 raises ConfigEntryAuthFailed and 401 triggers a warning plus entry reload; other ClientResponseError cases raise bare UpdateFailed. The coordinator will retry on its interval.","triggerScenarios":"Brunt cloud server dropping the connection during a periodic things poll; transient network interruption; server-side restarts during polling windows.","commonSituations":"Recurring coordinator failures during Brunt outages; entities flapping unavailable; long-running setups hitting nightly API maintenance.","solutions":["Wait for the next coordinator poll — ServerDisconnectedError is usually transient","Confirm Brunt cloud availability via the mobile app","If paired with 403s, reauthenticate (credentials issue, not connectivity)","If paired with 401s, a device was deleted from the account — the integration reloads itself; remove stale devices"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    data = await coordinator.async_refresh()\nexcept UpdateFailed:\n    # Brunt API dropped the connection; coordinator retries on its interval\n    pass","preventionTips":["Expect occasional ServerDisconnectedError polls during Brunt cloud maintenance","Watch for 403 (reauth needed) vs 401 (device removed) companions to distinguish root causes"],"tags":["brunt","coordinator","update-failed","server-disconnected","home-assistant"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}