CS
ClearStack Studio

When the run is green and the answer is wrong

A failed run is the easy case. It goes red, the Error Workflow fires, somebody gets a message. These four report success and write bad data — so nothing fires, and nobody looks.

Notes on the boring parts · a working reference · 6 minute read

Every one of the four below produces a green execution. The run summary is clean. The Executions list shows success. An Error Workflow attached to the whole thing stays silent, because from the platform's point of view nothing went wrong.

They are all recurring complaints in the n8n community forum, and they share one property: the error handling everyone builds first cannot see any of them. Catching them needs a different kind of check — an assertion about the shape of the result, not a listener for exceptions.

Each tab shows the run as it appears, the data it actually wrote, and the specific check that catches it.

The scrape returned nothing, and that counted as successrun: success

The source changed its markup. The selector matched zero elements. Returning an empty list is not an error, so the node succeeded and the workflow carried on.

The run
Schedule Trigger 1 item HTTP Request 1 item HTML Extract 0 items Postgres Insert 0 items Execution finished successfully · 1.4s
What it wrote
[] Nothing. Same as yesterday, and the day before. The alerts simply stopped, and no alert fires to tell you the alerts stopped.
The check
Assert the count before you trust the run. An IF node immediately after the extract, routing items.length === 0 to the failure path rather than letting it fall through as success.
IF {{ $items().length }} == 0 → true Stop and Error ("extract matched 0 rows") → false continue
An empty result is a legitimate outcome in some workflows. The point is that it should be a decision you made, not a default you inherited.

The common thread

None of these four are exotic. Each one is a normal day in a system that is working as designed — and in every case the error handling is silent, because there is no error. The run succeeded. That is the problem.

Error handling tells you a run failed. It cannot tell you a run succeeded and produced the wrong answer.

The fix is not more error handling. It is a small number of assertions about what a correct result looks like — a count, a shape, a uniqueness constraint, a heartbeat — placed where a wrong answer would otherwise pass through quietly. They cost very little at build time and are tedious to retrofit once the bad data is already downstream.

If you are auditing something you already run, the fastest first pass is to ask, for each scheduled workflow: would I notice if this quietly stopped? The answer is usually no for more of them than expected.

The workflow patterns behind these checks are on our GitHub, free and MIT licensed: github.com/clearstack-studio/automation-patterns. Take them, adapt them, no attribution needed.

ClearStack Studio builds and repairs automations across n8n, Make and Google Sheets, with the reliability work above included rather than sold separately. See what we do.