Let's add an error handler so that we can catch any errors:
- Look up Error handler via the search bar and then drag and drop the Try action. We will add all of the automation logic to this Try block in the next few sections.
- Before we do that, we'll add the Catch action below the Try one. In the Catch action's properties, set the Exception type to AllErrors.
- Create a String variable called errorMessage to store the error message:
- In the Catch block, also add a message box with the message Following error occurred $errorMessage$.
- Finally, click the Save button at the top to save the bot so that we can set up the credential locker.