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: