Error handling & Monitoring

How to handle errors in Frends Processes.

Frends implements multiple ways to handle errors from Processes. While the best option is to have no errors, working with multiple external systems means not everything is controlled by Frends.

Process error handling

Each Process in Frends can implement their own error handling procedure. At its simplest, a Catch shape can be used to handle any errors within the Process, without disrupting the Process execution more than necessary. This can be useful, if execution should continue for the remainder of data being handled, or if the error is small and can be fixed during the execution.

Image shows a Catch shape being used within Frends Process.
Common structure in Frends Process to handle an error within the Process.

Another option for error handling is using a common Subprocess to handle any errors that occurred during Process execution. This way if there are errors within Process that were not handled, a Subprocess will be called and it will execute its logic to handle the error. Common scheme to handle errors is to send an alert by email, optionally having a treshold value before or after sending an email.

Because the error handling is implemented as a Subprocess in Frends, the logic for it is just as flexible and easy to create as the integrations themselves. It should be noted however, that the Process execution will have stopped by the time the error handling Subprocess is executed, so it is only usable for alerting and possibly for cleanup of the Process.

Image showing parameters for Subprocess to call on unhandled error.
Parameters for Subprocess to call on unhandled error are specified by the Subprocess.

Monitoring Rules

In case even more complex monitoring and email alerts are required, Frends includes Monitoring Rules. These rules can be set to trigger a Process or send email alert if the conditions are fulfilled in the environment.

Monitoring rule view showing instance counts for the specified rule.

Common use cases for Monitoring Rules are to see if errors occur multiple times over a time period, or if integrations are not executed at all within a specified time, or less times than what is expected. They can also be used to monitor if something takes longer than expected. While these would be difficult to check and monitor within Process Instances, at Environment level it becomes easier and more intuitive to set up rules to monitor your integrations.

At the basis of Monitoring Rules are the promoted values from Processes. Monitoring Rules specifically target and monitor the promoted values from all Processes in the Environment, so it's possible to target either one or more Processes, or only specific errors from multiple different Processes.

And when the Monitoring Rule does notice that an alert should be made, it can be set to be either a simple email alert to specified recipients, or more advanced set of alerting and error handling tasks by triggering a Process to run, when the rules are fulfilled.

Last updated

Was this helpful?