**TL;DR:** 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.

## The error

```text
InvalidUpdateError: Expected dict, got ['whoops']
```

## The fix

1. Check every code path, including early returns and exception handlers. One path returning None or a list is enough to throw.

2. 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).

3. Nodes that only read state still return a dict; return an empty dict if there is nothing to update.

## When to use this

- You are seeing this exact error message; match the block above, not just part of it.
- The failing call matches the scenario in the title: InvalidUpdateError.
- You want the fastest verified fix before digging through logs.

## When not to use this

- Your error text differs from the block above; close cousins often have different causes.
- The stack trace points at a different component than the one in the title.
- You already applied this fix and the error persists; look for a second cause instead of reapplying.

## Compatibility

- Not pinned to a specific version; follows current InvalidUpdateError behavior.

## Also seen as

- `The broken node:`