Any Error
The Any Error block is used to define a global error-handling path within a flow or subflow in Leapwork. When any block fails during execution, without a specific Fail connector being triggered, the Any Error block activates automatically, capturing details about the failed block and its error message.
This block enables users to recover gracefully from unexpected failures and provides direct navigation to the block that caused the error through hyperlinks in the Action Log.
Note: Only one Any Error block can exist per flow or subflow. If an error occurs in a subflow without an Any Error block, it will escalate to the parent flow’s handler.
Fully expanded, the Any Error block shows the following properties:

Note: The block design shown above is part of the new Elegance Design, introduced in Leapwork version 2025.3. Earlier versions may display a different layout.
Including an Any Error block in your flow is the best way to ensure clear, actionable debugging information.
When this block is present, each failure in the Action Log automatically includes:

-
A hyperlink to the specific block that failed, allowing one-click navigation to its position on the canvas.
-
A red keyframe marker, helping visualize where the failure occurred during execution.
Without an Any Error block, the Action Log will not include these hyperlinks or enhanced debugging details.
The Block Header
The block header represents the primary logic of the Any Error block.
-
The green output connector at the top right activates when the block is triggered, starting the error-handling sequence.
-
The red color scheme visually indicates that this block belongs to the Error Handling category.
-
The block title (“Any Error”) is editable, allowing you to rename it for clarity (e.g., “Any Error – Login Failure”).
Error Message
This output connector (blue) passes a formatted message containing:
-
The name of the block that failed (or its custom name, if available).
-
The error message returned by that block.
By default, the message follows this structure:
“The <name of the block that failed> failed with the error: <error message>.”
This output can be connected to other blocks for follow-up actions such as notifications, logging, or conditional branching.
Created 28.10.25