Skip to content

Exception Handling for Automation or Scripts

Typical Use Cases

When we disable application logs or don't want to check application logs, we also want the executed automation or script to be able to capture corresponding exception behaviors when running abnormally and notify the corresponding roles or users through notifications (supporting third-party notifications).

Implementation Steps

Based on the above scenario, we first need to create a call automation or call script in the automation, and then enable Capture Call Exceptions (after enabling, when an exception occurs in the called automation/script, it will not terminate the operation of the automation, and we can obtain error information through exception codes and exception messages to handle exceptions ourselves).

If our automation does not call other automations or scripts, we can skip this step and proceed directly to the next step.

When calling a script:

When calling automation:

Based on the returned exception code, we can use conditional judgment to determine whether an exception occurs. If an exception occurs, we can create an automation step to send a notification to notify the corresponding user or role (if the platform is bound to a third party, system notifications will also trigger third-party notifications).

Exception code explanation:

If our automation does not call other automations or scripts, we can judge whether to print logs or terminate execution based on the parameters returned in specific actual automation steps.

Effect

The corresponding notification content can be seen in the platform notification bar.