Failures of action states in the flow are exposed via Exceptions which, as described above, can be handled via a
Catch property on the action state.
The form of the
Catch is as shown in the example, but the types of exceptions need to be discussed in more detail.
There are three forms of exceptions that impact an action execution:
ActionUnableToRun: This exception indicates that the initial attempt to run the action failed and no action whatsoever was initiated. The output of the exception contains the error structure returned by the action. This condition will always result in an exception.
ActionFailedException: This indicates that the action was able initiated but during execution the action was considered to have failed by the return of an action status with the value
FAILED. This exception will only be raised if the property
ExceptionOnActionFailureis set to true. This allows the action failure to be handled by checking the result or by causing an exception. Either approach is valid and different users and different use cases may lend themselves to either approach. In either case, the output will contain the same action status structure a completed action will contain, but the
statusvalue will necessarily be
ActionTimeout: When the
Actionstate is exceeded, this exception will be raised. The status of the most recent poll of the
Actionwill be contained within the body of the exception.