MCD - Level 1 Exam QuestionsBrowse all questions from this exam

MCD - Level 1 Exam - Question 120


Refer to the exhibits. The Mule application does NOT define any global error handlers.

The Validation component in the Try scope throws an error.

What response message is returned to a client request to the main flows HTTP Listener?

Show Answer
Correct Answer: B

When the Validation component in the Try scope throws an error, the 'On Error Continue' handler inside the Try scope will catch the error and set the payload to 'Error - Try scope'. Because the error is handled within the Try scope and 'On Error Continue' does not propagate the error further, the flow execution continues after the Try scope. Therefore, the payload that is set within the Try scope ('Error - Try scope') will be the response message returned to the client request.

Discussion

3 comments
Sign in to comment
ExamDevOption: C
Jan 23, 2024

Because the handler inside try scope is "On Error Continue" so will return the message from the last payload

marcop1Option: C
Jan 26, 2024

Not sure if it wouldn't bubble up to the main flow error handling. If not then C is correct; https://blogs.mulesoft.com/dev-guides/how-to-tutorials/mule4-error-handling-use-cases/

AlandtOption: C
Feb 8, 2024

Assuming no further errors occur after the Try scope, the payload set to "Success - main flow" will be the final payload, and that is what will be returned to the client. So, the response message returned to a client request to the main flow's HTTP Listener, after the Validation component in the Try scope throws an error and no further errors occur, will be: C. “Success – main flow”