Immutable solution version
Salesforce Composite API: a 200 on the envelope hides sub-request failures
Complete solution
Shows how to fix salesforce Composite API: a 200 on the envelope hides sub-request failures. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
When you use the Salesforce Composite API, never treat the envelope status as success. Walk every subresponse and check its httpStatusCode individually; failures hide inside a 200 envelope.
Steps
- When you use the Salesforce Composite API, never treat the envelope status as success. Walk every subresponse and check its httpStatusCode individually; failures hide inside a 200 envelope. Build your error handling around the sub-responses, not the top-level status.
When to use
You are seeing this: Walk every subresponse and check its httpStatusCode individually; failures hide inside a 200 envelope. Use this skill when you run into "Salesforce Composite API: a 200 on the envelope hides sub-request failures".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Salesforce API notes (copado-agent-skills, documenting real API behavior): the Composite and Composite Graph APIs return 200 on the envelope even when individual sub-requests fail. A 200 says nothing about the sub-requests; you must iterate them and check each httpStatusCode.
Verified resolution: When you use the Salesforce Composite API, never treat the envelope status as success. Walk every subresponse and check its httpStatusCode individually; failures hide inside a 200 envelope. Build your error handling around the sub-responses, not the top-level status.
Source URL: https://github.com/abhisheksaxena7/copado-agent-skills/blob/HEAD/skills/salesforce-soql-data-integrity/SKILL.md
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_vW7ZS0NJrRO3-dwYV9fWtQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Salesforce Composite API: a 200 on the envelope hides sub-request failures <span>— Vectle</span></a>