Alpha Notice: These docs cover the v1-alpha release. Content is incomplete and subject to change.For the latest stable version, see the current LangGraph Python or LangGraph JavaScript docs.
A LangGraph StateGraph
received a non-dict return type from a node. Here’s an example:
Copy
Ask AI
class State(TypedDict): some_key: strdef bad_node(state: State): # Should return a dict with a value for "some_key", not a list return ["whoops"]builder = StateGraph(State)builder.add_node(bad_node)...graph = builder.compile()
Invoking the above graph will result in an error like this: