{"record":{"id":"a537484c625e72ef","repo":"home-assistant/core","slug":"exc-a53748","errorCode":null,"errorMessage":"exc","messagePattern":"exc","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"error","filePath":"homeassistant/components/asuswrt/bridge.py","lineNumber":103,"sourceCode":"\ndef handle_errors_and_zip[_AsusWrtBridgeT: AsusWrtBridge](\n    exceptions: type[Exception] | tuple[type[Exception], ...], keys: list[str] | None\n) -> Callable[[_FuncType[_AsusWrtBridgeT]], _ReturnFuncType[_AsusWrtBridgeT]]:\n    \"\"\"Run library methods and zip results or manage exceptions.\"\"\"\n\n    def _handle_errors_and_zip(\n        func: _FuncType[_AsusWrtBridgeT],\n    ) -> _ReturnFuncType[_AsusWrtBridgeT]:\n        \"\"\"Run library methods and zip results or manage exceptions.\"\"\"\n\n        @functools.wraps(func)\n        async def _wrapper(\n            self: _AsusWrtBridgeT,\n        ) -> dict[str, float | str | None] | dict[str, float]:\n            try:\n                data = await func(self)\n            except exceptions as exc:\n                raise UpdateFailed(exc) from exc\n\n            if keys is None:\n                if not isinstance(data, dict):\n                    raise UpdateFailed(\"Received invalid data type\")\n                return data\n\n            if isinstance(data, dict):\n                return dict(zip(keys, list(data.values()), strict=False))\n            return dict(zip(keys, data, strict=False))\n\n        return _wrapper\n\n    return _handle_errors_and_zip\n\n\nclass AsusWrtBridge(ABC):\n    \"\"\"The Base Bridge abstract class.\"\"\"\n","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/asuswrt/bridge.py#L85-L121","documentation":"UpdateFailed raised by the asuswrt bridge's _handle_errors_and_zip decorator whenever the underlying aioasuswrt library call raises one of the configured `exceptions` (connection/SSH errors, timeouts, library errors). The original exception is chained (raise ... from exc); the log line shows 'exc' because the exception object itself is the message. It tells the DataUpdateCoordinator to mark the update failed and retry later.","triggerScenarios":"async_get_active_properties / protocol commands failing: SSH connection refused or auth failure to the router, telnet timeouts, aioasuswrt raising its library errors while reading temperature/traffic/etc.","commonSituations":"Wrong router password or SSH key after router firmware update; router IP changed by DHCP; SSH disabled on the ASUS router; router rebooting.","solutions":["Check router reachability: ssh from the HA host using the same credentials the integration stores","Fix credentials/host in the integration's Options (reconfigure flow) if SSH auth fails","Update the aioasuswrt library if the router firmware changed its command output","If transient (router reboot), no action: the coordinator retries on its interval"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"# Coordinator consumers get UpdateFailed via coordinator.last_exception / UpdateListeners\ntry:\n    await coordinator.async_config_entry_first_refresh()\nexcept ConfigEntryNotReady:\n    # bridge-level failures surface as not-ready; inspect __cause__ for the SSH error\n    raise","preventionTips":["Keep router SSH credentials correct via the integration's reconfigure flow","Reserve a static IP for the router","Watch the chained exception (__cause__) for the real library error before changing config"],"tags":["network","router","ssh","coordinator","asuswrt"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}