Loading

Global Error Handler Triggered Multiple Times For One Error In Mule 4

Fecha de publicación: Aug 16, 2025
Descripción

SYMPTOM

A Mule application has a global error handler defined, and it is noted that the processors inside the global error handler are triggered multiple times even if there is only one exception that happened in the application.


SAMPLE FLOW DESIGN
Flow Design

The "On Error Propagate" re-throws the  exception after processors have executed.  This is causing the "Flow Reference" in the parent Flow to throw an exception again and the exception is being caught by the Global Error handler again as no flow-level handler is defined.

Solución

Catch the exception at Flow level and only re-throw the error when it can not be handled at Flow level to the parent Flow.


Design the Global Error Handler to use "On Error Continue" instead of "Global Error Handler" to avoid recursive invocation of the error handler. The Global Error Handler is meant to be a safety net to handle an error that is unexpected at design time and avoid the raw error propagating to the client side instead of a silver bullet to catch and resolve all errors.

Número del artículo de conocimiento

001121687

 
Cargando
Salesforce Help | Article