BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
15 / 81 · Module 7 — Error Handling in Mule · filtered: interview← prev⊞ allnext →

7.35Partial failures

Suppose request contains:

100 Contacts

Salesforce processes:

97 success
3 fail

Is that:

success?
failure?
partial success?

The answer depends on your API contract.

One useful response:

{
  "status": "PARTIAL_SUCCESS",
  "processed": 100,
  "succeeded": 97,
  "failed": 3,
  "errors": [
    {
      "contactId": "P019",
      "code": "INVALID_EMAIL"
    }
  ]
}

This is often much more useful than:

500 Internal Server Error

for the entire batch.