Let's add an error handler try-catch to exit gracefully if there are errors.
- To do that, look up Error handler and then drag and drop the Try action. We will add most of the automation steps in this Try block in the next few sections.
- Before we do that, add the Catch action below Try.
- In the Catch properties, choose an Exception type of AllErrors.
- Create a String variable called errorMessage to store the error message.
- Click on the wizard icon on the right of the input box to create new variables, as shown here:
- Click on Apply to apply the properties.
- Then, within the Catch, add a message box with the message Following error happened $errorMessage$.
- Finally, click Save at the top to save the bot so far, before we open the SO Excel file.