{"record":{"id":"5ddfc0ad2fa02b67","repo":"HKUDS/nanobot","slug":"feishu-instance-at-index-index-must-be-an-object","errorCode":null,"errorMessage":"Feishu instance at index {index} must be an object","messagePattern":"Feishu instance at index (.+?) must be an object","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/feishu/instances.py","lineNumber":179,"sourceCode":"        specs.append(\n            ChannelInstanceSpec(\n                instance_id=instance_id,\n                config=config,\n            )\n        )\n\n    return specs\n\n\ndef canonical_feishu_section(section: Any, defaults: dict[str, Any]) -> dict[str, Any]:\n    \"\"\"Return a canonical section, rejecting input that cannot be preserved safely.\"\"\"\n    raw_specs, inherited = _feishu_instance_inputs(section, defaults)\n    instances: list[dict[str, Any]] = []\n    instance_ids: set[str] = set()\n\n    for index, raw in enumerate(raw_specs):\n        if not isinstance(raw, dict):\n            raise ValueError(f\"Feishu instance at index {index} must be an object\")\n        fallback_id = DEFAULT_INSTANCE_ID if index == 0 else f\"assistant-{index + 1}\"\n        try:\n            config = _normalize_feishu_instance(\n                cast(dict[str, Any], raw),\n                defaults,\n                inherited=inherited,\n                fallback_id=fallback_id,\n            )\n        except ValueError as exc:\n            raise ValueError(f\"Invalid Feishu instance at index {index}: {exc}\") from exc\n\n        instance_id = str(config[\"instanceId\"])\n        if instance_id in instance_ids:\n            raise ValueError(f\"duplicate Feishu instance id '{instance_id}'\")\n        instance_ids.add(instance_id)\n        instances.append(config)\n\n    return {\"instances\": instances}","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/feishu/instances.py#L161-L197","documentation":"Error \"Feishu instance at index {index} must be an object\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/channels/feishu/instances.py:179 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"}