Error handling and Try-Catch

Make a process cope with failures: retry a step, carry on past it, catch it with an EXCEPTION connection or a Try-Catch, and pause on an error while debugging.

Help Centre › Building Processes

Real automations hit problems: a slow website, a missing file, an unexpected pop-up. Automize gives you several ways to deal with a failure so one problem doesn't stop the whole run.

1. Retry or carry on: the step's own settings

Every bot step has an Error handling section in its edit form:

  • Max retries, Delay and Backoff: try the step again, up to 5 times, waiting between tries.
  • Continue if this step fails: once the retries are used up, log the failure and go on to the next step instead of stopping.
  • Can't be undone: turn on for a step that changes something in another system, such as submitting a form or making a payment. The bot tries it only once, and work that fails after it is not retried automatically.

Details: Retries and continue-on-fail.

2. The EXCEPTION connection

Any step can have an EXCEPTION connection as well as its normal one. If the step fails, the process follows the EXCEPTION connection instead.

  1. Add the step that should run when things go wrong, for example "Log the error and send an alert".
  2. Draw a second connection from the risky step to it. The map makes a step's second connection EXCEPTION (red). If it doesn't, click the connection and set its type to EXCEPTION.

If the recovery path loops back to try again, set a maximum on that connection so it can't loop forever.

3. The Try-Catch block

An EXCEPTION connection protects one step. A Try-Catch protects a group of steps. It is a box on the map with up to three parts:

  • Try: the steps to run.
  • Catch: the steps that run if anything in Try fails. Recover, log the problem or tell someone here.
  • Finally (optional): steps that run afterwards either way, such as closing a file or signing out.
  1. Open the Add step tab and drag Try-Catch onto the canvas.
  2. Put the steps to protect in the Try part.
  3. Put your recovery steps in the Catch part.
  4. If you need clean-up that always happens, turn on Include Finally block and add steps to it.

4. Which to use

  • A step that sometimes fails for a moment (slow page, busy file): retries.
  • A step that doesn't matter if it fails: Continue if this step fails.
  • One risky step with its own recovery: an EXCEPTION connection.
  • Several steps that succeed or fail together, or clean-up that must always happen: a Try-Catch.

5. Pause on an error while debugging

When you debug a process from the Run & debug tab, a step that fails (after its retries, and without "Continue if this step fails") pauses the run instead of ending it. The bot keeps the apps open, and the Debug panel shows the error with three buttons:

  • Retry this step: run the failed step again. Fix the step first if you need to (select it and press F2).
  • Ignore and continue from the next step: skip the failure and carry on.
  • Restart from the first step: start the run again.

The buttons appear only when the bot supports them; update the bot if you don't see them. This happens only in a debug run. Normal runs follow your error handling as above. See Running and debugging a process.

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.