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.

  1. Add a throw new fault action to an integration in either of the following ways:
    • On the side of the canvas, click Actions Integration actions icon and drag the Throw New Fault action to the appropriate location.
    • Click Add icon at the location where you want to add the throw new fault action, then select Throw New Fault.
  2. Click Edit Edit icon under Throw New Fault to enter a name and optional description for the throw new fault action.
    The Throw New Fault panel is displayed.


    The Throw New Fault panel shows the name field, description field, Code field, Reason field, Details field, and Skip Condition field.

  3. 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 Switch view icon to drag a value from the Sources panel.


      The Input Sources tab is selected. The Functions tab is to the right. Below Input Sources, the Sources tree is shown. On the right, the Throw New Fault panel shows the name field, description field, Code field, Reason field, Details field, and Skip Condition field.

  4. 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.


    The Throw New Fault panel shows the name field, description field, Code field, Reason field, Details field, and Skip Condition field.

  5. 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.


    Throw new fault action with a dashed line extending from the bottom.

    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.