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.)

  1. ANo stable machine-readable code, no field-level detail, no correlation id
  2. BError shapes are inconsistent across endpoints (string vs object, different keys)
  3. C500 leaks an internal stack trace to the client
  4. D200 status on a failed login (status and body disagree)
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

apierror-contracthttpapi-design