{"record":{"id":"0f16eac5dd6e5afe","repo":"HKUDS/nanobot","slug":"missing-feishu-connect-session","errorCode":null,"errorMessage":"missing Feishu connect session","messagePattern":"missing Feishu connect session","errorType":"http","errorClass":"ChannelConnectError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/feishu/connect.py","lineNumber":61,"sourceCode":"    \"\"\"\n\n    def __init__(self) -> None:\n        self._sessions: dict[str, FeishuConnectSession] = {}\n        self._completion_lock = threading.Lock()\n\n    async def handle(self, action: str, query: QueryParams) -> dict[str, Any]:\n        \"\"\"Handle one generic settings connection action.\"\"\"\n        if action == \"start\":\n            return await asyncio.to_thread(\n                self.start,\n                domain=(query_first(query, \"domain\") or \"feishu\").strip(),\n                instance_id=(query_first(query, \"instance_id\") or \"default\").strip(),\n                mode=(query_first(query, \"mode\") or \"replace\").strip(),\n            )\n\n        session_id = (query_first(query, \"session_id\") or \"\").strip()\n        if not session_id:\n            raise ChannelConnectError(\"missing Feishu connect session\")\n        if action == \"poll\":\n            return await asyncio.to_thread(self.poll, session_id)\n        if action == \"cancel\":\n            return await asyncio.to_thread(self.cancel, session_id)\n        raise ChannelConnectError(f\"unsupported Feishu connect action: {action}\", status=404)\n\n    def start(\n        self,\n        *,\n        domain: str = \"feishu\",\n        instance_id: str = DEFAULT_INSTANCE_ID,\n        mode: str = \"replace\",\n    ) -> dict[str, Any]:\n        domain = _normalize_domain(domain)\n        instance_id = _resolve_instance_id(instance_id, mode)\n        self._cleanup()\n        try:\n            feishu._init_registration(domain)","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/feishu/connect.py#L43-L79","documentation":"Error \"missing Feishu connect session\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/channels/feishu/connect.py:61 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"}