Learn
The API failure field guide
Everything that can go wrong between an API and its OpenAPI spec, and how to find and fix it. Each problem comes with a short story, a real example, a way to find it, a way to fix it and what Clear Signal does and does not see. One path for developers, engineering managers and DevOps.
The problems
Practical cards, grouped by where the problem shows up. Every card has real output from Clear Signal and a short video brief.
The response does not match the contract
- AC-001 The server answers a status the spec never listed Contract
- AC-002 The Content-Type is not the one the spec promised Contract
- AC-003 A required response header is missing Contract
- AC-004 A response header has a value of the wrong type Contract
- AC-005 A required field is missing from the body Contract
- AC-006 A field has the wrong type Contract
- AC-007 A value breaks a rule in the schema Contract
- AC-008 A date-time is in the wrong format Contract
- AC-009 Null where null is not allowed Contract
- AC-010 The body is not valid JSON, or is empty Contract
- AC-011 A body that can have several shapes fits none of them Contract
- AC-012 An extra field in a closed schema Contract
- AC-013 A secret field appears in a response Contract
- AC-014 Every error answers in a different shape Contract
- AC-015 Fields are renamed, removed or re-cased Contract
Broken bodies and broken connections
The spec and the server disagree about what exists
- AC-020 A documented route does not exist on the server Conformance
- AC-021 The route exists, but not for that HTTP method Conformance
- AC-022 A route on the server is not in the spec Conformance
- AC-023 A path parameter has a different type than the spec says Conformance
- AC-024 The server needs something the spec never mentions Conformance
- AC-025 The wrong API version answers Conformance
- AC-026 The server drifts away from its spec Conformance
The request itself is wrong
The server accepts too much
- AC-028 A request without a required field is accepted Conformance
- AC-029 A field of the wrong type is accepted Conformance
- AC-030 A missing required parameter is accepted Conformance
- AC-031 A request without credentials is accepted Conformance
- AC-032 Wrong, expired or under-privileged credentials are accepted Conformance
- AC-033 Loose validation: values outside the rules and unknown fields are accepted Conformance
Behaviour a schema cannot see
- AC-034 The wrong HTTP status for a business error Scenario
- AC-035 Authentication error codes are mixed up Scenario
- AC-036 The pagination contract is broken Scenario
- AC-037 A filter, limit or sort parameter is ignored Scenario
- AC-038 Valid shape, wrong meaning Scenario
- AC-039 HTTP method semantics are broken Scenario
- AC-040 A business rule is broken though every response looks fine Scenario
- AC-041 A write returns success but is not saved Scenario
State, retries and concurrency
- AC-042 A repeated write creates duplicates Scenario
- AC-043 A stale update overwrites a newer one (lost update) Scenario
- AC-044 A write times out, yet it was done Scenario
- AC-045 A stale read after a write Scenario
- AC-046 An async job never finishes Scenario
- AC-047 A batch operation is not atomic Scenario
Time and unstable servers
- AC-048 The server is slow Conformance
- AC-049 The server never answers, or answers too slowly in the body Conformance
- AC-050 The server fails every few calls Scenario
- AC-051 A rate limit hits unexpectedly Scenario
- AC-052 The server is down for a while and then recovers Scenario
- AC-053 The server gets slower with every call Scenario
Change over time
Run the examples yourself
The commands in the cards run against practice servers that you start on your own machine. Both repositories are public.
- Practice server: clone
api-workbench-sandbox
and run the
clrsigcommands from its folder. With Docker, start it like this:
Timing results are most reliable with Docker. The repository's README also shows how to start the server without it.docker build -t api-workbench-sandbox . docker run --rm -p 127.0.0.1:8080:8080 api-workbench-sandbox - Failure demos: a card whose command starts with
cd failures/…uses the failure catalog. The demos need Go. - AC-026
also needs a second practice server that has drifted:
docker run --rm -e DRIFT=1 -p 127.0.0.1:8081:8080 api-workbench-sandbox -
In Git Bash on Windows, run
export MSYS_NO_PATHCONV=1first. Otherwise the shell rewrites arguments that start with/, such as the value of--paths.
Safety: some commands send requests that change data. Run them against the practice servers or your own test server, never production.
More ways to learn
Reference
Failure modes (50)
The wider catalog of API failures by category, including those beyond what an OpenAPI spec can express, with runnable examples.
In the field
Stories (49)
Short accounts of how these failures show up in real systems, each linked to its failure mode.