Handling Errors8% of the exam

On Error Continue versus On Error Propagate

Predict what a caller, an HTTP Listener and a parent flow see when an error is handled by On Error Continue (the owner succeeds with the handler's result) or On Error Propagate (the error is re-thrown), including transactions and default error logging.

Official exam objective
Apply correct processors/syntax to implement on-error continue and on-error propagate handlers, and predict outcomes.

~7 min read · 6 practice questions ·

What the exam expects

  • Write an Error Handler with <on-error-continue> or <on-error-propagate> and predict the status code and body an HTTP Listener returns with its default responses.
  • Predict what a parent flow does after a Flow Reference when the referenced flow's error is continued or propagated.
  • State what each On-Error component does to a transaction its owner handles.
  • Explain why a handled error still appears in the log, and how to switch that off.

Key terms:

  • Owner: the Flow or Try scope whose Error Handler contains the On-Error component.
  • On Error Continue: runs its processors and uses their result as the owner's result, as if the owner succeeded.
  • On Error Propagate: runs its processors, then re-throws the error to the next level up.
  • Default responses: the HTTP Listener's 200-with-payload success response and 500-with-error-description error response.

Key facts

On Error Continue
Detail
Owner completes successfully with the handler's result
On Error Propagate
Detail
Runs, then re-throws; the owner fails
HTTP Listener default success response
Detail
200 with the payload as body
HTTP Listener default error response
Detail
500 with the flow error's description as body
Default handling
Detail
Behaves like On Error Propagate
Error in a referenced flow
Detail
Its own handler runs; a propagated error goes to the flow holding the Flow Reference
Flow Reference without target
Detail
Payload and variable changes in the referenced flow persist
Transactions
Detail
Continue commits, Propagate rolls back, only for a transaction the owner handles
logException
Detail
Default true: logs the matched error at ERROR before handling
enableNotifications
Detail
Default true: fires an ExceptionNotification
Sources for this section (4)
  • Why does a Flow Reference with a target leave the parent's payload unchanged after the referenced flow runs?
  • What are the HTTP Listener's default responses for success and for failure?
  • What does enableNotifications default to on an On-Error component, and what does it fire?
  • Why does a flow with no Error Handler return the same browser result as one with On Error Propagate?

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 (6 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Unlimited timed practice exams

Practice for the MuleSoft Developer exam