{"record":{"id":"8c484de104ef2086","repo":"run-llama/llama_index","slug":"document-node-id-is-not-a-node","errorCode":null,"errorMessage":"Document {node_id} is not a Node.","messagePattern":"Document (.+?) is not a Node\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/storage/docstore/types.py","lineNumber":209,"sourceCode":"        Get node from docstore.\n\n        Args:\n            node_id (str): node id\n            raise_error (bool): raise error if node_id not found\n\n        \"\"\"\n        doc = self.get_document(node_id, raise_error=raise_error)\n\n        if doc is None:\n            # The doc store should have raised an error if the node_id is not found, but it didn't\n            # so we raise an error here\n            if raise_error:\n                raise ValueError(f\"Node {node_id} not found\")\n            return None\n\n        # The document should always be a BaseNode, but we check to be safe\n        if not isinstance(doc, BaseNode):\n            raise ValueError(f\"Document {node_id} is not a Node.\")\n\n        return doc\n\n    @overload\n    async def aget_node(\n        self, node_id: str, raise_error: Literal[True] = True\n    ) -> BaseNode: ...\n\n    @overload\n    async def aget_node(\n        self, node_id: str, raise_error: Literal[False] = False\n    ) -> Optional[BaseNode]: ...\n\n    async def aget_node(\n        self, node_id: str, raise_error: bool = True\n    ) -> Optional[BaseNode]:\n        \"\"\"\n        Get node from docstore.","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/storage/docstore/types.py#L191-L227","documentation":"Error \"Document {node_id} is not a Node.\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/storage/docstore/types.py:209 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Store a Node subclass instance under this id, not a plain Document.","Wrap the data in a TextNode/Node before adding it to the docstore."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}