On failure
Configure what Harness does when a stage or step fails — abort, retry, ignore, or mark as success.
The On failure setting defines how Harness responds when a stage or step fails. By default, a failure aborts the rest of the pipeline. You can override this individually on any stage or step.
What you will learn
The available failure actions: abort, retry, ignore, mark as success, manual intervention, and rollback
How to target specific error types (timeout, connectivity, authorization) with individual failure rules
How to configure retry with backoff and escalate to manual intervention after retries are exhausted
How ignored failures affect the pipeline's final status
Actions
fail
Mark the stage as failed and stop the pipeline. This is the default.
abort
Abort the pipeline immediately.
ignore
Mark the stage as failed but continue running the next stage.
success
Treat the failure as a success and continue the pipeline.
retry
Re-run the stage up to a configured number of times before giving up.
manual-intervention
Pause execution and wait for a user to take action. Harness displays a popup with options: Mark as Success, Ignore, Retry, Abort, or Rollback Stage. If no action is taken before the timeout expires, the timeout-action runs.
stage-rollback
Trigger the stage's rollback steps.
pipeline-rollback
Trigger rollback across all stages in the pipeline.
Error types
A failure strategy can target specific error types rather than applying to all failures:
all
Any failure
timeout
Stage exceeds its timeout duration
input-timeout
Input waiting for user response times out
authentication
Authentication errors
authorization
Authorization/permission errors
connectivity
Network or connectivity errors
verification
Verification step failures
approval-rejection
An approval step is rejected
policy-evaluation
Policy evaluation failure
delegate-provisioning
Delegate could not be provisioned
delegate-restart
Delegate restarted during execution
user-mark-fail
Stage was manually marked as failed
unknown
Unclassified errors
YAML
on-failure is a list of rules. Each rule specifies one or more error types and the action to take:
Retry with backoff
When action is retry, configure the number of attempts, the interval between them, and what to do if all attempts are exhausted:
Retry, then pause for manual intervention
If you want a human to decide after retries are exhausted, use manual-intervention as the failure-action. The pipeline waits up to timeout for input. If no one responds, timeout-action runs instead:
Valid timeout-action values: fail, ignore, abort, success, stage-rollback, pipeline-rollback.
Multiple rules
Different actions for different error types; rules are evaluated in order:
Pipeline status with ignored failures
When action: ignore is used and a stage fails, the pipeline status shows as IgnoreFailed, not Success. The pipeline completes and all subsequent stages run, but the final status reflects that at least one stage was ignored.
Next steps
Go to Conditional execution to skip a stage based on an expression.
Go to Timeout to set the maximum run time for a stage.
Go to Pipelines overview to review the pipeline model.
Last updated
Was this helpful?