BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
243 / 1048 · Module 7 — Error Handling in Mule← prev⊞ allnext →

7.22Custom application errors

Suppose Salesforce says:

record doesn't exist

but in your domain that's:

CUSTOMER_NOT_FOUND

Mule supports mapping errors to custom application error types. MuleSoft specifically describes error mapping as a way to distinguish otherwise-similar component errors and route them to appropriate handlers.

Conceptually:

SALESFORCE:NOT_FOUND
        ↓
APP:CUSTOMER_NOT_FOUND

Then the rest of your application reasons about:

APP:CUSTOMER_NOT_FOUND

rather than Salesforce implementation details.

Excellent architecture.