Resume error handler
4 min
the resume error handler replaces a failed bundle with a substitute output that you define when an error occurs, the rest of the scenario continues using that substitute data all remaining bundles in the scenario flow are processed normally when to use it use the resume error handler when you have a substitute mapping that allows the bundle to continue through the scenario flow you can use it as a placeholder to flag the bundle for review later for example amy retrieves a list of new user sign ups she uses make to send a welcome email to each user one user has no email address recorded, producing an error she uses resume error handler to substitute the missing email with a placeholder such as unknown\@company com the scenario continues processing the remaining users as normal the failed bundle is logged against the placeholder address for review, while every other users receive their welcome email for more information about error handling strategies check the overview of error handling docid\ sn7mce4qml q6wdtoocsy how the resume error handler works when a module encounters an error, the resume error handler substitutes the failed bundle with custom data defined in the error handler's settings instead of dropping or pausing the , make replaces it with your substitute mapping and continues the scenario flow as normal unlike the skip error handler, the bundle is not removed from the flow — it continues through the remaining modules using the substitute data use the resume error handler in this example, we have a scenario that updates a data store and then sends a slack message if the data store update fails because of a missing value, it simply replaces it with a substitute value and the continues as usual this demo contains five modules json parse json provides test data in the form of an array of three record ids iterator splits the array into individual bundles data store update a record updates the data in the data store data store update a record this module updates the data again this time the module works differently in the module mapping, there is a mapping that intentionally creates an error the mapping inserts a null value into the required key field, which always creates the bundlevalidationerror slack send a message sends a message to a private testing channel this is how the example looks when we would run the example , we would get the bundlevalidationerror let's see how to handle this error using a resume error handler right click the module that is causing the error in the menu, select add error handler select the resume error handler fill in the resume handler settings with your custom mapping save your you've successfully added the resume error handler to your what happens when you run the scenario after you add a resume error handler since we added the resume error handler to the update a record module, the resume error handler would replace the bundle with the substitute mapping when the module outputs an error, would use the substitute bundle instead the third bundle runs through the in the resume error handler settings, you get the same fields as in the handled module settings in the error handler fields, you can provide custom data that uses instead of the bundle that caused the error you can use the resume error handler when you have a substitute mapping that fixes the bundle and allows the data bundle to continue in the flow you can also use the resume error handler to add a placeholder that marks the data bundle to check later