> For the complete documentation index, see [llms.txt](https://docs.zerowork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerowork.io/building-blocks/logic/raise-error.md).

# Raise Error

<figure><picture><source srcset="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-0121425491e0a406bb79be78fb1378cd72aa20b6%2Fraise-error-tile-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-346229f087c6ba1c7778c9c7361afd7fe9900a15%2Fraise-error-tile.png?alt=media" alt="Raise Error block" width="279"></picture><figcaption></figcaption></figure>

**Raise Error** stops the flow with your own error message. Use it when your TaskBot detects that something went wrong, for example when a condition shows that the login expired or a search returned no results.

The run ends at this building block, unless the block is inside a [Try-Catch scope](https://docs.zerowork.io/building-blocks/logic/try-catch.md). In that case the error is caught and the flow continues at **On Catch Error**.

<figure><picture><source srcset="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-44914149aedd80961a2c6c38594b541ec86d7782%2Fraise-error-settings-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-c9ed25d26a6974fc1489d4a95ea8c9638f286d89%2Fraise-error-settings.png?alt=media" alt="Raise Error settings" width="555"></picture><figcaption></figcaption></figure>

## Options

* **Error message**: the text shown in the run logs. Inside a Try-Catch scope, it is also the message that Start Try-Catch saves.
* **Mark this TaskBot run as failed in the run report**: the run result is set to failed, even if the error is caught by a Try-Catch scope.
* **Include this error in the error report**: the error is added to the run's error report, even if it is caught by a Try-Catch scope.
