{"record":{"id":"2a85fcbcf42ce5d9","repo":"langchain-ai/langgraph","slug":"unsupported-node-type-type-node","errorCode":null,"errorMessage":"Unsupported node type: {type(node)}","messagePattern":"Unsupported node type: (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/graph/state.py","lineNumber":128,"sourceCode":"\n\ndef _warn_invalid_state_schema(schema: type[Any] | Any) -> None:\n    if isinstance(schema, type):\n        return\n    if typing.get_args(schema):\n        return\n    warnings.warn(\n        f\"Invalid state_schema: {schema}. Expected a type or Annotated[type, reducer]. \"\n        \"Please provide a valid schema to ensure correct updates.\\n\"\n        \" See: https://langchain-ai.github.io/langgraph/reference/graphs/#stategraph\"\n    )\n\n\ndef _get_node_name(node: StateNode[Any, ContextT]) -> str:\n    try:\n        return getattr(node, \"__name__\", node.__class__.__name__)\n    except AttributeError:\n        raise TypeError(f\"Unsupported node type: {type(node)}\")\n\n\nclass StateGraph(Generic[StateT, ContextT, InputT, OutputT]):\n    \"\"\"A graph whose nodes communicate by reading and writing to a shared state.\n\n    The signature of each node is `State -> Partial<State>`.\n\n    Each state key can optionally be annotated with a reducer function that\n    will be used to aggregate the values of that key received from multiple nodes.\n    The signature of a reducer function is `(Value, Value) -> Value`.\n\n    !!! warning\n\n        `StateGraph` is a builder class and cannot be used directly for execution.\n        You must first call `.compile()` to create an executable graph that supports\n        methods like `invoke()`, `stream()`, `astream()`, and `ainvoke()`. See the\n        `CompiledStateGraph` documentation for more details.\n","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/graph/state.py#L110-L146","documentation":"Error \"Unsupported node type: {type(node)}\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/graph/state.py:128 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":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}