Why Tasks Fail
Common failure modes in browser automation:Timeouts
An element takes longer than expected to appear.
Popups & Modals
A popup or modal interrupts the expected flow.
Network Failures
A network request fails or times out.
Stale Selectors
A selector becomes stale after a navigation.
CAPTCHA
A CAPTCHA is triggered.
Dynamic Content
Dynamic content changes the page structure.
The On Error Block
The On Error block is Figranium’s primary error handling mechanism. It works like atry/catch: if any action in the main flow raises an error, execution jumps to the On Error block.

Making an Action Optional
Making an Action Optional
The simplest use: place an empty On Error / End block to absorb errors from an action that may or may not exist:

Fallback Action
Fallback Action
Perform a fallback action when the primary approach fails:

Stop on Error with a Reason
Stop on Error with a Reason
Log the failure and stop the task cleanly:

Retry Patterns
Retry with a Counter Variable
Use a While loop combined with a counter to retry a failing action up to N times:
Retry a Login

Handling Popups and Modals
Popups that appear unpredictably are a common cause of task failures. Handle them proactively.Check and Dismiss Before Proceeding

Dismiss Any Popup on Every Page
Use a sub-task triggered via a Start Task block to handle common popups at the beginning of every task:
Timeout Strategies
Each action block can have its owntimeout (in milliseconds). Use shorter timeouts for elements that should appear quickly, and longer ones for slow-loading content.

Logging Errors for Inspection
Use a JavaScript block inside an On Error branch to log diagnostic information to the execution output:
Output Provider Error Handling
When using Output Providers, you can control what happens if the data push to an external service fails:onError: "ignore"(default): The execution is marked as successful even if the push fails.onError: "fail": The execution is marked as failed if the push fails.
fail when data delivery is critical and you want alerts on push failures.