Error handling
Throw
4min
{{product name}} does not offer the throw quick error handling reference docid\ mettcf9yurrywtsf1whdw this feature implementation is being analyzed and evaluated this article describes alternatives and workarounds to mimic the throw error handling directive alternate solution 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 docid 2zexwuohei0yvsoeq2nag module configured to optionally throw an error ( bundlevalidationerror in this case) you can then attach one of the quick error handling reference docid\ mettcf9yurrywtsf1whdw to the error handling route to force the {{scenario singular lowercase}} execution to stop and perform the rollback phase rollback force the {{scenario singular lowercase}} execution to stop and perform the commit phase commit stop the processing of a route ignore stop the processing of a route and storing it in the queue of incomplete executions docid 6zznn7v35herrcjfccp9q break the following example shows the use of the rollback directive workaround using http module usecase retry after some time if there is 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 {{product name}} 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 singular lowercase}} 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 singular lowercase}} linking the http module using webhook with a second {{scenario singular lowercase}} if no result found you can customize the module to throw an error {{scenario singular}} one replace the module where you want to throw an error with http > make a request module configure the url within the query parameter that you will get from the custom webhook module and add an optional query parameter to search for the email enable the advanced settings and check the evaluate all the states as errors add a break handler in that http module and configure the setup to run later {{scenario singular}} 2 setup webhooks > custom webhooks as a trigger and copy the url use it in the http module as shown in the previous steps here use the zendesk > search for a user module use the parameter from the http module to perform a query enable continue the execution of the route even if the module returns no results add a router and create two routes consecutively setup the webhook response module 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