Enterprise Reusable Global Error Handler Plugin Architecture
Standardize error responses across 100+ APIs: RFC 7807 problem details, correlationId propagation, custom error hierarchies, and shared Maven governance.
Why should an enterprise package its error handler as a shared Maven dependency rather than copying XML snippets?
🎯 HOW TO ANSWER (SENIOR ARCHITECT SCRIPT)
Copying error handling XML snippets leads to inconsistent HTTP status codes, varying error payload formats, and maintenance nightmares when corporate logging standards change. A shared Maven plugin enforces standardized RFC 7807 JSON error responses across all System, Process, and Experience APIs.
How do you propagate a System API error through a Process API to an Experience API cleanly?
🎯 HOW TO ANSWER (SENIOR ARCHITECT SCRIPT)
When SAPI returns HTTP 400/500, PAPI's HTTP request component catches it inside a Try scope. Rather than throwing a generic MULE:HTTP_INTERNAL_SERVER_ERROR, PAPI extracts error.errorMessage.payload and rethrows a custom BUSINESS:ERROR with the original SAPI error payload preserved.