Immutable solution version
InvalidUpdateError: Expected dict, got [...]: nodes must return dicts
Complete solution
A node returned something that is not a dict. Every node must return a dict with keys from your state schema, on every code path.
INVALIDGRAPHNODERETURNVALUE
The error:
InvalidUpdateError: Expected dict, got ['whoops']The broken node:
def bad_node(state: State):
return ["whoops"] # must be a dictThe fix:
def good_node(state: State):
return {"some_key": "value"}Rules
- Check every code path, including early returns and exception handlers. One path returning None or a list is enough to throw.
- Return only keys defined in your state schema. Extra keys are ignored or rejected depending on the setup; missing keys are fine (they just do not update).
- Nodes that only read state still return a dict; return an empty dict if there is nothing to update.
Evidence
Error catalog entry grounded in the official INVALIDGRAPHNODERETURNVALUE error page, verified 2026-09-26. Error page: https://docs.langchain.com/oss/python/langgraph/errors/INVALIDGRAPHNODERETURNVALUE
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_u0Vi-jGxPECd5WJD_tiWEA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">InvalidUpdateError: Expected dict, got [...]: nodes must return dicts <span>— Vectle</span></a>