> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/use-harness-platform/pipelines/failure-handling/mark-step-as-failed.md).

# Mark Step as failed

Mark a step as failed during pipeline execution to abort it and trigger failure strategies.

You can manually mark a specific step as failed during pipeline execution. When you mark a step as failed, Harness aborts the running step and triggers configured failure strategies.

This action is useful when you have multiple steps running in a parallel step group and you need to stop a specific running step while allowing other steps to continue.

***

### What you will learn from this topic

* How to [configure a failure strategy](#configure-failure-strategy) for manually marked step failures.
* How to [mark a step as failed](#mark-a-step-as-failed) during pipeline execution.

***

### Before you begin

* **Pipeline permissions:** You must have Execute permissions on pipelines to mark a step as failed. For more information, refer to [Manage roles](/harness-platform/use-harness-platform/platform-access-control/add-manage-roles.md).
* **Account setting enabled:** You must enable **Allow users to mark a running Step as failure** in your Harness account's [default settings](/harness-platform/use-harness-platform/settings/default-settings.md).

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-c8e89c473eaf77810904139c1c588e77940ddb3d%2Fenable-mark-step-failed.png?alt=media)

***

### Configure failure strategy

Failure strategies define the actions to take when a step fails. You can configure failure strategies for different failure conditions.

If a step marked as failed has no specified failure strategy, Harness uses the default failure strategy.

Perform the following steps to configure a failure strategy for manual step failure:

1. In your pipeline, select the step where you want to configure a failure strategy.
2. Click the **Advanced** tab.
3. Under **Failure Strategy**, click **Add**.
4. For **On failure of type**, select **User Marked Failure**.
5. For **Perform Action**, select the desired action to take when the step is marked as failed, such as **Rollback** or **Retry**.
6. Click **Save**.

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-9c64a586434b547ea69c6c6d58f6e569c9fb6591%2Ffailure-strategy-step-failed.png?alt=media)

***

### Mark a step as failed

Perform the following steps to mark a step as failed during pipeline execution:

1. [Go to the execution details](/harness-platform/use-harness-platform/pipelines/executions-and-logs/view-and-compare-pipeline-executions.md) for a currently-running pipeline.
2. Select the step you want to mark as failed, and click **Mark Step As Failed**.

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-d6ca06e9ce3c4ccea8848421e95630139ddb9c1c%2Fmark-step-failed.png?alt=media)

3. Click **Confirm**.

In the execution history, the step's **Error Summary** reports `User Initiated Failure`, and the step's failure type is `USER_MARKED_FAILURE`.

***

### Next steps

* [Define a failure strategy on stages and steps](/harness-platform/use-harness-platform/pipelines/failure-handling/define-a-failure-strategy-on-stages-and-steps.md): Configure automated failure handling strategies for different error conditions.
* [Mark stage as failed](/harness-platform/use-harness-platform/pipelines/failure-handling/mark-as-failed.md): Mark an entire stage as failed instead of a single step.

{% @harness-feedback/feedback module="harness-ai" pagePath="harness-ai/use-harness-platform/pipelines/failure-handling/mark-step-as-failed" %}
