Handling Errors8% of the exam
Error matching order and error type hierarchy
How an Error Handler with several On-Error components picks one: first match in order of appearance, by type list, parent type and when condition, plus which errors (CRITICAL) no handler can catch and what happens when nothing matches.
Apply correct processors/syntax to combine multiple error handlers, and predict outcomes.
~6 min read · 5 practice questions ·
What the exam expects
- Order several On-Error components in one Error Handler so a specific error is caught before a broader one.
- Predict which component handles an error given
typelists, parent types andwhenconditions. - Name the parent types that match a given error type (for example
HTTP:UNAUTHORIZED). - Identify the errors that no On-Error component can handle, and predict the outcome when no component matches.
Key terms:
- Error type:
NAMESPACE:IDENTIFIER, such asHTTP:NOT_FOUND; runtime errors have an implicitMULEnamespace. - Parent type: a broader type in the hierarchy that also matches its children, such as
MULE:SECURITYforHTTP:UNAUTHORIZED. whencondition: a matching expression that must evaluate totruefor the component to match.ANYandCRITICAL: the two roots; everything underANYcan be handled, nothing underCRITICALcan.
Key facts
Which component runs
- Detail
- The first one that matches, in order of appearance
type attribute- Detail
- Comma-separated list of Mule error types
when attribute- Detail
- Matching expression that must evaluate to a boolean (true or false)
Implicit namespace
- Detail
EXPRESSION=MULE:EXPRESSION
HTTP:UNAUTHORIZED ancestors- Detail
MULE:CLIENT_SECURITY, thenMULE:SECURITY, thenANY
Unhandleable errors
- Detail
CRITICAL(OVERLOAD,FATAL_JVM_ERROR), only logged
UNKNOWN- Detail
- Not handled directly, only through
ANY
No component matches
- Detail
- Default error handling logs and propagates
Propagated error at an HTTP Listener
- Detail
- 500 with the error description as body
- Why does a handler for
ANYalso catchRETRY_EXHAUSTED? - Why is
UNKNOWNhandled only throughANYand not by its own On-Error component? - Why does a custom type such as
ORDER:INVALID_DATAstill match a handler of typeANY? - When does Mule raise
COMPOSITE_ROUTING?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the MuleSoft Developer pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 40 lessons of the MuleSoft Developer guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Practice exams purchase adds inline bank questions and topic practice (5 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams