# INVALID_GRAPH_NODE_RETURN_VALUE

The error:

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

The broken node:

```python
def bad_node(state: State):
    return ["whoops"]  # must be a dict
```

The fix:

```python
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.