HKUDS/nanobot · error · ChannelConnectError

unsupported Feishu connect action

Error message

unsupported Feishu connect action: {action}

What it means

Routing guard in FeishuConnectHandler.handle: the action query parameter was neither 'start', 'poll', nor 'cancel'. A session_id was present, but the verb is unknown, so the handler rejects it with ChannelConnectError and HTTP status 404.

Solutions

  1. Use one of the supported connect actions
  2. Update the WebUI/client to the current connect API
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at nanobot/channels/feishu/connect.py:66 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26). Data as JSON: /api/errors/8c072cbd8ee58b46. Report an issue: GitHub.

Appendix: source

Thrown at nanobot/channels/feishu/connect.py:66

    async def handle(self, action: str, query: QueryParams) -> dict[str, Any]:
        """Handle one generic settings connection action."""
        if action == "start":
            return await asyncio.to_thread(
                self.start,
                domain=(query_first(query, "domain") or "feishu").strip(),
                instance_id=(query_first(query, "instance_id") or "default").strip(),
                mode=(query_first(query, "mode") or "replace").strip(),
            )

        session_id = (query_first(query, "session_id") or "").strip()
        if not session_id:
            raise ChannelConnectError("missing Feishu connect session")
        if action == "poll":
            return await asyncio.to_thread(self.poll, session_id)
        if action == "cancel":
            return await asyncio.to_thread(self.cancel, session_id)
        raise ChannelConnectError(f"unsupported Feishu connect action: {action}", status=404)

    def start(
        self,
        *,
        domain: str = "feishu",
        instance_id: str = DEFAULT_INSTANCE_ID,
        mode: str = "replace",
    ) -> dict[str, Any]:
        domain = _normalize_domain(domain)
        instance_id = _resolve_instance_id(instance_id, mode)
        self._cleanup()
        try:
            feishu._init_registration(domain)
            begin = feishu._begin_registration(domain)
        except (RuntimeError, OSError, json.JSONDecodeError, httpx.HTTPError) as exc:
            raise ChannelConnectError(
                f"Unable to start Feishu/Lark connection: {exc}",
                status=502,

View on GitHub (pinned to 42f37dc4c0)