223 / 278 · Module 14 — External Automated Testing of Mule Integrations · filtered: code← prev⊞ allnext →
14.55Don't assert raw downstream error messages
Bad test:
expect(body.message)
.toBe('INVALID_FIELD_FOR_INSERT_UPDATE...');
if your public API contract intentionally normalizes errors.
Better:
expect(body.code)
.toBe('INVALID_CUSTOMER');
Otherwise your tests lock the API to Salesforce implementation details.