{"record":{"id":"09649ce12daa1bf2","repo":"ruvnet/RuView","slug":"not-connected-to-router","errorCode":null,"errorMessage":"Not connected to router","messagePattern":"Not connected to router","errorType":"exception","errorClass":"RouterConnectionError","httpStatus":null,"severity":"error","filePath":"archive/v1/src/hardware/router_interface.py","lineNumber":116,"sourceCode":"            self.ssh_client.close()\n            self.is_connected = False\n            self.ssh_client = None\n            self.logger.info(\"Disconnected from router\")\n    \n    async def execute_command(self, command: str) -> str:\n        \"\"\"Execute command on router via SSH.\n        \n        Args:\n            command: Command to execute\n            \n        Returns:\n            Command output\n            \n        Raises:\n            RouterConnectionError: If not connected or command fails\n        \"\"\"\n        if not self.is_connected:\n            raise RouterConnectionError(\"Not connected to router\")\n        \n        # Retry mechanism for temporary failures\n        for attempt in range(self.max_retries):\n            try:\n                result = await self.ssh_client.run(command, timeout=self.command_timeout)\n                \n                if result.returncode != 0:\n                    raise RouterConnectionError(f\"Command failed: {result.stderr}\")\n                \n                return result.stdout\n                \n            except ConnectionError as e:\n                if attempt < self.max_retries - 1:\n                    self.logger.warning(f\"Command attempt {attempt + 1} failed, retrying: {e}\")\n                    await asyncio.sleep(self.retry_delay)\n                else:\n                    raise RouterConnectionError(f\"Command execution failed after {self.max_retries} retries: {e}\")\n            except Exception as e:","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/hardware/router_interface.py#L98-L134","documentation":"Error \"Not connected to router\" thrown in ruvnet/RuView.","triggerScenarios":"Thrown at archive/v1/src/hardware/router_interface.py:116 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}