{"record":{"id":"312c1e1213ae9496","repo":"HKUDS/nanobot","slug":"matrix-message-was-not-delivered-response","errorCode":null,"errorMessage":"Matrix message was not delivered: {response}","messagePattern":"Matrix message was not delivered: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/matrix/runtime.py","lineNumber":621,"sourceCode":"            if candidates:\n                limit_bytes = await self._effective_media_limit_bytes()\n                for path in candidates:\n                    if fail := await self._upload_and_send_attachment(\n                        room_id=msg.chat_id,\n                        path=path,\n                        limit_bytes=limit_bytes,\n                        relates_to=relates_to,\n                    ):\n                        failures.append(fail)\n            if failures:\n                text = f\"{text.rstrip()}\\n{chr(10).join(failures)}\" if text.strip() else \"\\n\".join(failures)\n            if text.strip():\n                content = _build_matrix_text_content(text)\n                if relates_to:\n                    content[\"m.relates_to\"] = relates_to\n                response = await self._send_room_content(msg.chat_id, content)\n                if isinstance(response, RoomSendError):\n                    raise RuntimeError(f\"Matrix message was not delivered: {response}\")\n        finally:\n            if not is_progress:\n                await self._stop_typing_keepalive(msg.chat_id, clear_typing=True)\n\n    async def send_delta(\n        self,\n        chat_id: str,\n        delta: str,\n        metadata: dict[str, Any] | None = None,\n        *,\n        stream_id: str | None = None,\n        stream_end: bool = False,\n        resuming: bool = False,\n        merge_next: bool = False,\n    ) -> None:\n        relates_to = self._build_thread_relates_to(metadata)\n\n        if stream_end and merge_next:","sourceCodeStart":603,"sourceCodeEnd":639,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/matrix/runtime.py#L603-L639","documentation":"Error \"Matrix message was not delivered: {response}\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/channels/matrix/runtime.py:621 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"}