Issue with my RPA code

I am facing an issue with my RPA code. I have automated a process for data entry into an internal database, but it seems that the bots are not able to handle exceptions or errors that may occur during the process. This is causing the automation to fail and manual intervention is required, defeating the purpose of using RPA in the first place. I read this article to get more understanding and tried debugging the code, but I am not able to identify the root cause of the issue. Here's a sample of the code that's causing the problem:"submit_button")
result = bot.get_text("status_message")
if result == "Success":"continue_button")
  # What should I do here to handle exceptions or errors?

  Discussion posts and replies are publicly visible