Throw Faults with a Throw New Fault Action
You can create and throw your own faults in an integration with a throw new fault action. During configuration of this action, you define the condition under which to throw the fault and the point in the integration at which to throw the fault. You can add this action at the end of a block (for example, a for-each action, switch action, and so on). Nothing can be dropped after this action in the block.
- Add a throw new fault action to an integration in either of the following
ways:
- On the side of the canvas, click Actions
and drag the Throw New Fault action to the appropriate location.
- Click
at the location where you want to add the throw new fault action, then select Throw New Fault.
- On the side of the canvas, click Actions
- Click Edit
under Throw New Fault to enter a name and optional description for the throw new fault action.
The Throw New Fault panel is displayed.
- Click a field to open the Sources panel and specify
values in any of the following ways:
- Enter manually.
- Select from the list.
- Click Switch to Developer View
to drag a value from the Sources panel.
- Complete the fields:
Element Description Code Create a code value. This is a mandatory field.
Reason Define a reason for the error.
Details Define additional error details.
Skip Condition Define a condition to prevent the fault from being thrown.
- Click Save
If a skip condition is not defined, the throw new fault action is displayed with a dashed line connecting to the next action. This signifies that the action continues processing only after processing the fault.
If a skip condition is defined, the line connecting to the next action is solid. The solid line indicates that it is possible that the processing of the integration bypasses the fault and goes straight through to the next action.
Deleting the throw new fault action has no impact on downstream activities because this error does not have any output. Any changes to upstream activities triggers a throw new fault action validation because both the Code, Reason, and Details fields in the Throw New Fault page can point to flow input or upstream outputs.