{"record":{"id":"7b5278dfeea94305","repo":"HKUDS/nanobot","slug":"sse-connection-failed-with-status-response-status","errorCode":null,"errorMessage":"SSE connection failed with status {response.status_code}","messagePattern":"SSE connection failed with status (.+?)","errorType":"exception","errorClass":"ConnectionError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/signal/runtime.py","lineNumber":615,"sourceCode":"            raise\n        finally:\n            # Keep typing active across progress updates; stop on the final reply.\n            if not is_progress_message:\n                # Avoid immediate START->STOP for fast responses, which can be invisible\n                # in some Signal clients. Let indicator expire naturally (~15s).\n                await self._stop_typing(msg.chat_id, send_stop=False)\n\n    async def _sse_receive_loop(self) -> None:\n        \"\"\"Receive messages via Server-Sent Events (HTTP mode).\"\"\"\n        if not self._http:\n            raise RuntimeError(\"HTTP client not initialized for Signal SSE stream\")\n\n        self.logger.info(\"Started Signal message receive loop (SSE)\")\n\n        try:\n            async with self._http.stream(\"GET\", \"/api/v1/events\") as response:\n                if response.status_code != 200:\n                    raise ConnectionError(\n                        f\"SSE connection failed with status {response.status_code}\"\n                    )\n\n                self.logger.info(\"Subscribed to Signal messages via SSE\")\n\n                # Buffer for accumulating SSE data across multiple lines\n                event_buffer: list[str] = []\n\n                async for line in response.aiter_lines():\n                    if not self._running:\n                        break\n\n                    # Debug: log raw SSE lines (except keepalive pings)\n                    if line and line != \":\":\n                        self.logger.debug(\"SSE line received: {}\", line[:200])\n\n                    # SSE format handling\n                    if isinstance(line, str):  # pyright: ignore[reportUnnecessaryIsInstance]","sourceCodeStart":597,"sourceCodeEnd":633,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/signal/runtime.py#L597-L633","documentation":"Error \"SSE connection failed with status {response.status_code}\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/channels/signal/runtime.py:615 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":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}