API Testing / Scenario
The Inconsistent Error Contract
Three endpoints, three different error shapes, one furious integration team. Review the errors and design the contract.
- Difficulty
- Hard
- Format
- Scenario
- Points
- 200
- Estimate
- 15 min
// MISSION BRIEF
Your Mission
An integration partner is drowning. Your API's errors are a different shape on every endpoint: a 200 that says "failed", a 500 that leaks a stack trace, a 400 with no detail. Clients cannot branch, support cannot correlate.
Read the sample responses, find every defect, and specify the error contract that should replace them.
// FIRST CONTACT
Battle teaser
First artifact
Three error responses from the same API
Which are real defects in these responses? (Select all that apply.)
- ANo stable machine-readable code, no field-level detail, no correlation id
- BError shapes are inconsistent across endpoints (string vs object, different keys)
- C500 leaks an internal stack trace to the client
- D200 status on a failed login (status and body disagree)
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
apierror-contracthttpapi-design