Skip to content
Agentic Workflowdocs
v0.9.0Install free

concepts / flow

Error handling

Decide what happens when a step fails: retry it, carry on without it, catch it with Try / Catch, or get alerted.

Try / Catch guards a page read. The page has changed and the step fails, so the rest of the guarded steps are skipped and the Catch branch receives one item describing the failure.

Example run: Try / Catch, 1 item → Get Element Data, error → Catch branch, 1 item. Illustration of a run. The Catch item names the failed step, its error and the data it was given.

Output of Catch branch
#nodeLabelmessageinput
0Get Element DataNo element matches the selector .price{"url":"https://shop.example/p/1"}
Illustration of a run. The Catch item names the failed step, its error and the data it was given.

Double-click the step to open its settings, then:

The Advanced tab of the SHA-512 step in the Hash Text example: On error with Stop the run selected (Continue with an empty result and Send to an error output below it), Try again automatically ticked with Retries, Wait (seconds), Wait pattern and Which errors, and Pass an empty item when there's no result. The Advanced tab of the SHA-512 step in the Hash Text example: On error with Stop the run selected (Continue with an empty result and Send to an error output below it), Try again automatically ticked with Retries, Wait (seconds), Wait pattern and Which errors, and Pass an empty item when there's no result.

Numbered areas in the screenshot: 1. Advanced tab; 2. Try again automatically; 3. Retries; 4. Wait (seconds); 5. Wait pattern; 6. Which errors; 7. Time limit.

When a service answers 429 or 503 with a Retry-After, AWFlow waits at least that long (up to 5 minutes). The run log says each time: “Retry 1 of 2 (attempt 2 of 3)”. Steps that call the network and were added by Aria or a template retry twice by default.

On error, in the same Advanced tab, decides what happens once the retries are used up:

The Advanced tab of the SHA-512 step in the Hash Text example: On error with Stop the run selected (Continue with an empty result and Send to an error output below it), Try again automatically ticked with Retries, Wait (seconds), Wait pattern and Which errors, and Pass an empty item when there's no result. The Advanced tab of the SHA-512 step in the Hash Text example: On error with Stop the run selected (Continue with an empty result and Send to an error output below it), Try again automatically ticked with Retries, Wait (seconds), Wait pattern and Which errors, and Pass an empty item when there's no result.

Numbered areas in the screenshot: 1. On error; 2. Pass an empty item when there's no result.

With On error set to Send to an error output, the step gets a red Error output after its other outputs. When the step works on several items and some fail:

  • each failed item goes down Error, as { error: { message, name }, input, itemIndex };
  • the items that worked carry on through the normal output.

The normal output runs only if at least one item worked, and the Error output only if one failed; an unused side is skipped like an untaken If branch. The run is recorded as Done with errors, and the canvas shows an amber “2 failed → Error” badge on the step; its Output switches between Success and Error.

Some failures still stop the step: you pressed Stop, or you refused a permission.

An Error output with nothing linked to it stops the run at the step when an item fails, as before, but AWFlow now says so. The output reads Error · not connected, and the step’s Advanced tab says Nothing is connected to Error yet, with Add a step to Error or Stop the run instead. Add a step to Error opens the step picker on that output, with a few suggestions for failed items (each gets its error and the input it had), or Another step…. A run that stopped this way says nothing is connected to its Error output, with Connect a step (see Runs).

To run only the failed items again once you fixed the cause, use Run again on them in the run (see Run failed items again).

Wire the steps you want to protect to the Try output of a Try / Catch node, and the plan B to Catch. Bring both branches back into the same step to mark where the guarded part ends.

flowchart LR
  S[Start] --> T{Try / Catch}
  T -->|Try| F[Get Element Data] --> P[Edit Fields]
  T -->|Catch| A[Send an alert]
  P --> J[Save]
  A --> J
  class T awf-flow
  class F,P awf-data
  class A awf-err
  class J awf-ok

If a guarded step fails, the rest of the Try branch is skipped and Catch runs with nodeLabel, message and input. A failure inside the Catch branch isn’t caught by the same Try: it goes to an outer Try / Catch, or ends the run.

To stop a run on purpose with a clear message, use Stop and Error.

An Error Trigger starts a workflow when a watched workflow fails. It receives the failed workflow, the step that failed, the error and its input. It fires for runs that start on their own (a schedule, a page load, a hotkey and so on), not for runs you start yourself from the editor, and not for failures a Try / Catch already handled. A failed run is always recorded as Failed (never Canceled), so the Error Trigger sees it.

Workflow settings › When this fails lists the workflows that watch this one and can Create an error workflow for you.

One failing step ended the whole run

That’s the default. Turn on Try again automatically or change On error in the step’s Advanced tab, or guard it with Try / Catch.

A step kept retrying a “401 Unauthorized” error

Which errors is set to Any error. Set it to Temporary only so the step fails fast when the problem won’t go away, then fix the connection.

The steps after a failed step get an empty item

That’s how Continue with an empty result works: the failed step outputs one empty item. Add a fallback in later expressions, such as {{ $input.title || "Untitled" }}, or check for it with an If, or use Send to an error output instead.

The Error Trigger didn’t fire

You started the run yourself, a Try / Catch handled the failure, or the alert workflow isn’t On. See the Error Trigger rules.

A page step fails with an element not found

The page changed, or it wasn’t ready yet. Add Wait For Element before the step, and check the selector still matches. See Browser context.

Ask Aria