Skip to content

feat: Add continue_on_error support for workflow steps and actions#6554

Open
ausias-armesto wants to merge 3 commits into
keephq:mainfrom
ausias-armesto:ausias/continue-on-error
Open

feat: Add continue_on_error support for workflow steps and actions#6554
ausias-armesto wants to merge 3 commits into
keephq:mainfrom
ausias-armesto:ausias/continue-on-error

Conversation

@ausias-armesto
Copy link
Copy Markdown
Contributor

Closes #6553

Description

Adds a continue_on_error attribute to workflow steps and actions. When set to true, a step or action failure is swallowed and execution continues to the next step/action.

Default is false, so existing workflows are unaffected.

Changes

Area File What
Backend keep/step/step.py continue_on_error attribute + property on Step
Backend keep/workflowmanager/workflow.py run_steps() catches StepError and continues; run_actions() suppresses the error, both when the flag is set
Frontend keep-ui/entities/workflows/model/yaml.schema.ts continue_on_error: boolean (optional) added to YamlStepOrActionSchema — enables Monaco validation and autocomplete
Tests tests/test_steps.py Unit tests for the Step.continue_on_error property
Tests tests/test_workflowmanager.py Behavioural tests for run_steps() and run_actions()
Docs docs/workflows/syntax/steps-and-actions.mdx New subsection under "Error Handling and Retries"
Docs docs/workflows/examples/continue-on-error.mdx New example page with step and action use cases

How to test

steps:
  - name: optional-enrichment
    continue_on_error: true
    provider:
      type: http
      config: "{{ providers.some-api }}"
      with:
        url: "https://api.example.com/enrich/{{ alert.fingerprint }}"

  - name: always-runs
    provider:
      type: slack
      config: "{{ providers.slack-demo }}"
      with:
        message: "Runs even if enrichment failed"
  1. Create a workflow with the YAML above.
  2. Point optional-enrichment at a URL that returns an error.
  3. Verify that always-runs still executes and the workflow execution status is success.
  4. Remove continue_on_error: true and verify the workflow now stops at the failing step.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. Documentation Improvements or additions to documentation Feature A new feature labels Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation Feature A new feature size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[➕ Feature]: Add continue_on_error support for workflow steps and actions

1 participant