Error Handling Rules
Error Handling Rules (also known as Exception Rules) allow you to define exactly how an action should behave when it encounters a specific type of error. Rules are defined within each Action's properties.
Rule Types
When configuring an action, you can choose from several rule types:
🔄 Retry
The action will automatically attempt to re-execute itself if it fails.
- Max Retries: The number of times the action should retry before giving up.
- Retry Delay: The amount of time (in milliseconds) to wait between retries.
- Use Case: Excellent for handling transient issues like slow network responses or elements that haven't appeared yet.
⏩ Ignore Exception
The action will simply ignore the error and proceed to the next action in the sequence.
- Use Case: Useful for optional steps, like checking for a notification that may or may not exist.
📍 Goto Action
This rule defines the "On Error" connection for the action. If the exception occurs, the workflow will jump to a specific action identified by its unique Action ID.
- Action ID: The identifier of the target action.
- Use Case: Allows you to create a dedicated "error branch" (e.g., logging an error and then continuing with a cleanup task).
🛑 Abort Execution
The workflow stops immediately. No further actions are executed, and the overall status is marked as failed.
- Use Case: Crucial for errors from which the automation cannot recover (e.g., critical data validation failures).
⚪ None
No special rule is applied. If an exception occurs and no other rules match, the workflow will fail.
How Rules are Applied
Rules are evaluated in a specific order:
- Specific Exception Rule: Talos checks if you have defined a rule for the specific Exception Type that occurred.
- "ALL" Rule: If no specific rule matches, Talos checks if an ALL rule exists.
- Default Behavior: If no matching rule is found (or it is set to None), the workflow will stop and fail.
Best Practices
- Branching via Goto Action: Use the Goto Action rule when you need to perform specific recovery steps (like taking a screenshot or sending an email) before potentially resuming your workflow.
- Retry Transient Failures: Always use a Retry rule for actions that depend on network stability or external application performance.
- Catch-All Rules: Consider adding an ALL rule to ensure a graceful shutdown or notification for unexpected errors.
- Specific Before General: Define specific rules for known errors (like Detection Error) and use an ALL rule for any other failures.