
The main flow is configured with their error handlers. A web client submit a request to the HTTP Listener and the HTTP Request throws an HTTP:NOT_FOUND error.
What response message is returned?’’
What response message is returned?
Show answerHide answer
Correct answer: A APP: API RESOURCE NOT FOUND
Explanation
Explanation:Let's trace through the error handling:
HTTP Request throws HTTP:NOT_FOUND error.
Error Mapping in the HTTP Request:
Has an error mapping: HTTP:NOT_FOUND → APP:API_RESOURCE_NOT_FOUND
This means the HTTP:NOT_FOUND error is re-mapped to APP:API_RESOURCE_NOT_FOUND before reaching the flow's error handler.
Flow Error Handler:
Has an On Error Propagate for HTTP:NOT_FOUND → but this won't trigger because error was already re-mapped
Has an On Error Propagate for APP:API_RESOURCE_NOT_FOUND → This WILL trigger
This error handler sets payload to "APP:API_RESOURCE_NOT_FOUND"
Key Point:
Error mappings in processors (like HTTP Request) happen before the flow's error handlers
The re-mapped error (APP:API_RESOURCE_NOT_FOUND) propagates up
The matching error handler for APP:API_RESOURCE_NOT_FOUND executes and sets the payload
Why not other options:
B. HTTP:NOT_FOUND: Would be if error mapping didn't exist or didn't work
C. other error: Would be if error didn't match any specific handlers and went to the On Error Continue with when: #[true], but APP:API_RESOURCE_NOT_FOUND has a specific handler
D. success: Clearly not, since an error occurred
Key Concepts Tested:
Error mapping in processors vs. flow error handlers
Order of error processing (mapping first, then error handlers)
Error propagation behavior
Reference:
MuleSoft Documentation: Error mappings in processors transform error types before they reach flow error handlers.





