PLANNED- see the Workaround - Using JSON Module || Workaround - Using HTTP Module section below.
In some cases, you may want to forcibly stop the scenario execution followed by the rollback or commit phase or to stop the processing of a route and optionally store it in the queue of incomplete executions.
Currently, the error handling directives can not be used out of the scope of an error handling route and Integromat does not offer a module that would enable you to easily conditionally generate (throw) errors.
To conditionally throw an error you may configure a module to make it optionally purposely fail during its operation. One possibility is to employ JSON > Parse JSON module configured to optionally throw an error (BundleValidationError in this case):
You can then attach one of the error handling directives to the error handling route to:
The following example shows the use of the Rollback directive:
Usecase - Retry after some time if no record found using Break Directive. Usually, this is crucial when your record doesn't update instantly and you would like to process it later on in automation. Using this Break directive could be handy with the lesser complexity of the setup.
Current Barrier - Integromat does not offer a module that would enable you to easily conditionally generate (throw) errors.
To give you a better understanding here is the current setup without modification: This scenario search in Zendesk if there is no use it won’t throw an error forcefully to search it again you would need to implement a complex procedure by saving the record.
Solution - To conditionally throw an error you may replace the module where you want to throw an error, with an HTTP module then perform the search in a second scenario linking the HTTP module using webhook with a second scenario. If no result found you can customize the module to throw an error
Scenario One -
Scenario 2 -
The following example returning the result - You will notice when the Zendesk module executes the API it doesn’t send any error message but in the action, we’re replicating the error using the HTTP module.