DAG Catch icon

DAG Catch

Handle failures from a DAG Try block and optionally recover.

DAG Catch

AI-generated

Summary

Handle errors from a preceding DAG Try block by either returning fallback data or rethrowing the error to stop execution.

Inputs

  • Recovery Mode (required) — Choose how to handle the error: provide 'fallback' data or 'rethrow' the error upwards.
  • Fallback Value — JSON data to output when using 'fallback' recovery mode; ignored if 'rethrow' is selected.
  • Log Error — Whether to include the original error details in the output items for diagnostic purposes.

Output shape

a list of items, each containing JSON data potentially augmented with recovery status and fallback data

If 'rethrow' mode is selected, the node throws an error instead of returning output items. If 'fallback' mode is selected, output items include _dagStatus set to 'catch_recovered', embed fallback data under _dagFallbackData, and optionally include original error details under _dagError if logging is enabled.

Examples

Example 1: Using fallback recovery to supply default data on DAG Try failure.

Recovery Mode: fallback; Fallback Value: custom JSON data; Log Error: true; Input items with _dagError present in their JSON.

Example 2: Rethrowing error to halt workflow execution on DAG Try failure.

Recovery Mode: rethrow; Log Error setting unused; Node throws an error with the original _dagError message from input items.

Links

Discussion