About
Proper error handling practices when creating recipes ensures that Insightly AppConnect users are prepared to handle errors that may arise.
In this Article
What is Error Handling?
Insightly AppConnect users can ensure that their recipes run smoothly by utilizing error handling habits in their recipes. The following practices can be used to implement error handling:
- Error Monitoring Step: This type of step is utilized to check if an action (or set of actions) was completed successfully.
- Conditional Actions: These types of actions can be utilized to validate data pills and also raise any applicable exceptions with a stop action.
- Stop Actions: This action is used if any incoming data is not properly formatted.
- Custom Error Emails: Users can implement this step to generate alerts with information regarding an error.
Error Monitoring Steps
Users can monitor specific steps for errors; this allows AppConnect to watch for errors (user or system generated) so they can be identified and handled appropriately.
To add an error monitoring step, click Add New Step and select Handle Errors to add an Action with Error Monitoring. All steps that are to be monitored should be nested under the Monitor step as this is what enables AppConnect to monitor the actions for errors.
- Recipes can be configured to retry the monitored steps one to three times (or skip the next steps) once an error has been identified.
- If a recipe fails after the applicable number of retries the recipe will then perform any steps nested under the On Error Retry step
Conditional Actions
Users can assist in preventing errors by checking input values to important actions. Conditional actions can be added to a recipe to validate incoming data and stop actions can be used to end or fail a recipe early in order to compensate for unnecessary processing times and API calls; this practice speeds up the time that jobs take to complete. To add conditional actions, users can click Add New Step and select Conditional Action.
Stop Actions
Data validation can be performed by utilizing conditional actions and the recipe can be stopped with a stop action immediately if discrepancies are found during data validation. Utilizing data validation steps and stop actions makes recipes more efficient and compensates for unnecessary processing times and API calls; this practice speeds up the time that jobs take. When implementing a stop action, the stop reason can be customized to include a personalized error message in the job report and in any applicable error emails. To add a stop action, users can click Add New Step and select Stop Action.
Custom Error Emails
When utilizing the send email action, users should ensure that errors are added as an attachment with a description file name such as errors.txt. It is considered a best practice to ensure that the email contains the data pills for the job URL, recipe URL, and details of when the recipe ran (data pills can be located via the Properties tab in the data tree).