Experimental
The context for automation.
The main function to be executed. If this function throws an error, the user is presented with a retry option.
Optional
options: ErrorStepWithRepeatOptionsOptions to customize the error message, retry mechanism, and UI elements.
The return value of the function fn
if successful, or undefined
if the user elects to close the retry bubble.
await errorStepWithRepeat(ctx, async () => {
await someOperation();
}, {
errorMsg: "An error occurred. Please fix the issue and try again.",
title: "Error Detected",
description: "Ice cream machine is broken. Please fix the issue and try again.",
loaderTitle: "Attempting to Resolve...",
showLoader: true
});
Executes a function and displays an interactive message bubble if an error occurs, with options to retry or close.
Designed to enhance error handling in automated processes. If the provided function (
fn
) throws an error, a message bubble is displayed with options to retry or close the bubble. The process is repeated until success or the user chooses to close the bubble.Useful for scenarios where immediate user intervention might be required, such as continuous unexpected host changes or issues in an automation flow.