On this page
Sommatic Docs
Open portal

When a node fails

The two ways a node fails, leaving through its error port or crashing its worker, and how each one ends the step and the run.

View as Markdown
Open in

A node fails in one of two ways, and they end differently:

  • The node returns through its error port. This is a normal result: the worker finished, the envelope has port: 'error' and the run follows the error edge, as for any other port (see Errors).
  • The worker throws. The state machine moves it to CRASHED and the engine records the step as failed. Inside a flow.try scope, the run continues at its catch node with { error, source_node, source_operator }; otherwise the whole run ends as failed with Node <node_id> (<slug>) failed: <message>.

The engine still stops a crashed worker; stopping an instance that already crashed is a no-op, so the cleanup never hides the original error.

How to choose

  • Expect the failure and handle it in the graph: connect the node’s error port. Most nodes catch their own errors and leave through error with the message in data.
  • Protect a part of the graph from crashes: wrap it in flow.try.
  • Retry transient failures: use the node’s execution settings where the node honours them (see Limits).

Where to see it

The run’s history shows each step with its status: a step that left through error shows its envelope; a crashed step shows error with the message. The run’s result records the failing node in its error.

Next steps

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs