Salesforce Decode
Salesforcedecode
Apex questionsQuestion 84 of 179
ApexIntermediateintegrationerror-handlingrest-api

Design Apex-friendly error envelope for external REST consumers

Scenario

Partners parse Apex REST error bodies inconsistently. Some get generic 500 with stack trace fragments exposing internal class names.

Answer it out loud first

Serious prep means attempting before reading. Take two minutes to structure your answer, then compare.