Error Handling and Recovery?

During a batch processing job, encounter an unexpected pop-up error that halts the automation.
How would handle such an error in UiPath to ensure the automation continues or retries the operation?

@rajmoin136

-Use the Try Catch activity to handle exceptions within the specific part of the workflow where the error might occur.
-Within the Catch block, use the Element Exists activity to check for the presence of the unexpected pop-up.
-If the pop-up is detected, use the Click activity to close or dismiss the pop-up.
-Optionally, log the error details using the Log Message activity for future analysis.
-Implement a retry mechanism using the Retry Scope activity or by re-running the failed section of the workflow.
-Ensure the workflow can recover and continue processing the remaining items in the batch.

Cheers

1 Like

Hi @rajmoin136

Popup is throwing by any web or desktop application you are automating or the popup was throwing by the UiPath.

If the Popup is throwing in web or desktop application, then use the check app state activity and indicate on the popup, In check app state, Targe appear block insert the click or keyboard shortcuts activity to handle the popup.

Hope it helps!!

@rajmoin136

  • Try-Catch Block:
  • Place the main batch processing activities within a Try block.
  • In the Catch block, catch specific exceptions like UiPath.Core.SelectorNotFoundException or System.Exception to handle the pop-up error.
  • Element Exists Activity:
  • Use this activity within the Catch block to check for the presence of the unexpected pop-up.
  • Create a boolean variable (e.g., popUpExists) to store the result of the Element Exists activity.
  • Close Pop-up:
  • If popUpExists is true, use activities like Click or Send Hotkey to close the pop-up.
  • Retry Scope:
  • Use a Retry Scope activity to retry the operation that failed due to the pop-up.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.