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?
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?
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.
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”
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/
Because the handler inside try scope is "On Error Continue" so will return the message from the last payload