Catching Faults from the Mediation Flow

One Catch Fault task catches faults encountered while processing the mediation flow.

Faults in a mediation flow can occur in the following situations:

  • An explicit fault is thrown with the Throw Fault task. This task can either throw the MediationTaskFault message or it can be configured to throw a different message defined in a service descriptor in the project.
  • A mediation task throws the declared MediationTaskFault fault during processing (this also applies to tasks on target fault paths).
  • An undeclared exception occurs during mediation processing. In this case, the MediatinTaskRuntimeFault is thrown.
Catch fault task for the mediation flow


The above figure shows the Catch Fault task for the mediation flow. In this example, the mediation flow has a Throw Fault task that throws the searchHotel_faultMsg fault, and the MediationTaskFault, MediationTaskRuntimeFault, and catch all options are present in all Catch Fault tasks for mediation flows.

By default, the MediationTaskFault and MediationTaskRuntimeFault sub-paths are configured with Transform tasks that transform the caught fault into an UndeclaredFault message. If you check the Catch and Handle field for any faults declared on the target operation, you must configure the corresponding Send Fault task and provide any required transformations by adding a Transform task to the sub-path, if necessary.

Catching All Faults

If you choose not to catch specific faults from the target operation or the mediation flow, the Catch All fault option remains selected. In this case, the Fault to Send field of the Send Fault task contains an option Original Fault That Was Thrown. When this option is selected, all encountered faults are passed on the caller as they occur without any transformation.