Skip to main content
Skip table of contents

Stop on Error

LAST UPDATED: MARCH 10, 2025

The Stop on Error feature is a checkbox available in the task configuration pop-up window for many playbook task types. When selected, the task stops executing if it encounters an error, preventing the execution of dependent tasks

Frame 1.png

Task Types That Support the Stop on Error Checkbox

The Stop on Error checkbox is available for the task types listed in the following table.

Task Type

Location

Command

Group 3.png

Conditional

Group 4.png

Data Formatter

Group 6 (1).png

Interaction (Investigation Playbooks only)

Group 7 (1).png

Passdown (Preprocessing Playbooks only)

Group 12.png

REST API

Group 8 (1).png

Unwind

Group 9.png

Merge

Group 10.png

Lock

Group 11.png

Unlock

Group 11 (1).png

Determining When to Use the Stop on Error Feature

The Stop on Error feature is useful for preventing cascading failures in playbook execution. Enabling it ensures that dependent tasks do not run if a critical task encounters an error, minimizing downstream issues.

Group 26.png

With Stop on Error disabled on the failed Format Message task, its dependent task also failed due to reliance on its successful execution.

Group 27.png

With Stop on Error enabled on the failed Format Message task, its dependent task does not run, preventing cascading errors.

For tasks set to auto-run with many auto-run dependencies, enabling the Stop on Error feature is essential to maintaining playbook stability and preventing widespread task failures.

Use Case Example: Preventing Multiple Failures with Stop on Error

SCENARIO A playbook contains multiple command tasks from the Cloudflare integration. All tasks depend on the List Accounts task. If this task fails, subsequent tasks relying on its successful execution may also fail, resulting in a cascade of errors during a playbook run.

Group 22.png

Review the demonstration below, which includes an intentionally misconfigured List Accounts task to illustrate the impact of Stop on Error when enabled versus disabled.

WARNING

Step 5 utilizes the Test Playbook functionality. Before proceeding, ensure to read Playbook Testing and Task Re-runs, including the nuances of using it in the context of a task with Stop on Error enabled.

  1. Add the List Accounts command task from the Cloudflare integration.

    Group 17.png
  1. Intentionally misconfigure the List Accounts task.

    Group 16 (2).png
    1. Click into the List Accounts task.

    2. Leave the connection parameter empty to intentionally produce an error.

    3. Select the Auto Run checkbox.

    4. Leave the Stop on Error checkbox unchecked.

    5. Click the Group 147.png button to save the task.

  2. Add and configure the Create Access Rule, Create List, and Create Zone tasks as dependencies of List Accounts, ensuring the Auto Run checkbox is selected for each.

    Group 19.png

    These tasks all rely on the output from the List Accounts task and use dynamic data selection to populate the Account IDs parameters for successful execution.

  3. Add and configure an auto-run Add Items to List task as a dependent task of the Create List task, again using dynamic data selection to populate the required parameters.

    Group 20.png

    This task requires outputs from both the List Accounts task and the Create List task to populate its required parameters Account ID (output from List Accounts) and List ID (output from Create List).

  4. Click the Test Playbook button to test run the playbook execution.

    Group 2 (1).png

  5. Observe the failures.

    Group 23.png

    Because the List Accounts command has encountered an error, all its dependent tasks have also failed. This includes Add Items to List, which is affected as a dependency of the downstream task Create List.

  6. Click the button to stop the playbook execution.

  7. Click into the List Accounts task, check the Stop on Error checkbox, then click the Group 147.png button to save the task.

    Group 24.png

    Again, keep the connection parameter empty to intentionally trigger an error.

  8. Click the button to test re-run the playbook execution.

  9. Observe the playbook execution with Stop on Error enabled.

    Group 25.png

    The playbook execution stops at the failed task and does not proceed to dependent tasks, preventing further failures.

READER NOTE

Users can use the Stop on Error checkbox with the Error Trigger feature to route playbook errors to the On Playbook Task Errors trigger path. This can be used, for example, to notify relevant parties via email when a critical task fails to execute.

Group 28.png

Refer to On Playbook Task Errors for details.

Fixing the Error of a Task with Stop on Error Enabled

Users can click the Group 142.png button on a task with Stop on Error enabled to troubleshoot it and re-execute it upon remediation using the Rerun button. Clicking the Rerun button executes all tasks from the failure point onward, not just the task with the error. Refer to this article for further details.

Fixing the Error During Playbook Testing

  1. Click the Group 142.png button, then examine the error message.

    Group 30 (2).png
  2. Click the errored List Accounts task and troubleshoot the error by using a valid connection.

    Group 31 (1).png
  3. Click the Group 142.png button again, then click the Rerun button to re-execute this task and all tasks following it.

    Group 32 (1).png

Fixing an Error in a Live Playbook Attached to an Incident

  1. Click the Edit or View Draft button on the playbook canvas of the live playbook.

    Group 33.png
  2. Repeat steps 1 and 2 from Fixing the Error During Playbook Testing to view and remediate the error.

  3. Click the Submit button.

    Group 34.png
  4. Navigate to the Investigation Dashboard module, then select the incident using the playbook.

    Group 35.png
  5. Select the Playbooks tab, then click into the relevant playbook.

    Group 36.png
  6. Click the Get Latest Playbook button.

    Group 37.png
  7. Click the Group 41.png button to refresh the playbook.

    Group 39.png
  8. Select the task with the error, then click the Rerun button to re-execute this task and all tasks following it.

    Group 38.png
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.