mcd-level-1 question 11 discussion

View all MuleSoft Certified Developer - Level 1 (Mule 4) Exam here
back to mulesoft forum

Question 11

Refer to the exhibits.



The Validation component in the private flow throws an error. What response message is returned to
a client request to the main flow's HTTP Listener?

  • A. Error - private flow
  • B. Error - main flow
  • C. Success - main flow
  • D. Validation Error
Answer:

B


Explanation:
Error in validation component will get processed by Processer level On Error Propagate block and
then error will be rethrown which will get processed by flow level error handler which will set

payload to "Error- main flow". Hence correct answer is Error - main flow
1) Request is received by HTTP listener
2) Try scope gets executed
3) The validator component in the Try scope creates an Error Object because the payload is not null.
4) The On Error Propagate handles the error. The payload is set to Error Try scope
6) Error Try scope is returned to the 'On Error Continue' block. Main flow execution stops.
Payload is set to "Error - main flow"
7) Error - main flow is returned to the requestor in the body of the HTTP request. HTTP Status
Code: 200
--------------------------------------------------------------------------------------------------------------------------------------
----
Reference Diagram though not exactly same, conditions are similar. They will help you answer any
new question on error handling in real exam:

User Votes:
A
50%
B 1 votes
50%
C 1 votes
50%
D
50%
Discussions
0 / 1000
Ameen
1 year, 1 month ago

I think “C” is the correct answer, because in the screenshot in question child flow used On Error Continue. so the child flow will return 200. Therefor Main flow print “Success Main flow”.
But in the answer explanation screenshot, you used On Error Propogate so this will move to the On Error Continue in Main Flow.
Screenshot in question and answer explanation is not the same

galibakravan (replied to Ameen)
7 months ago

Correct - Answer should be Success - Main Flow