Catch exception
The Catch Exception Action Node is used to execute an action when an error occurs.
When an error occurs in an action node, normal execution of the action will stop, and Appfarm will look for a Catch Exception Action Node. It will first look downward on the same level, then go up one level to look for it there (top-down), and so on. When it finds a catch block that meets the criteria of the error, the catch will execute whatever is defined inside it and then resume execution starting with the node directly after the catch (unless you use end execution or some other flow-changing action).
Settings
Catch All
If selected, all types of errors will trigger the execution of the action nodes inside the action.
Execution Types
If Catch All is not selected, you need to define the execution type(s) that shall be caught. Four different options are available, and have a set of different properties.
Delete Constraint Exception
Used when there's a Delete Rule on a relation in the database, and the user tries to delete a parent. As long as objects in an object class have reference to a remote object class, deletions of referenced objects will not be allowed, i.e., if objects in the Project object class reference a Person object, it will not be possible to delete that Person object.
Web Request Error
Used when a web request returns an error, i.e., 400 or 500 error codes. If you don't want the action node to catch all exceptions, you might define specific HTTP Error Codes to be caught by the action node.
Custom Exception
Used when a Throw Exception Action Node returns an error. If you don't want the action node to catch all custom exceptions, you can define specific error codes that should be caught by the action node.
Defined Errors
Used when Appfarm returns an error. Only the error codes you define will be caught by the action node. Here is a list of relevant Appfarm Error Codes.
Result mapping
Result mapping might be used to map error data to Data Sources. The following data is available:
The data is returned as a JSON object, and body data can be mapped by setting RootPath to body.theKeyYouWant
.
Last updated