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

Broken bodies and broken connections

The spec and the server disagree about what exists

The request itself is wrong

The server accepts too much

Behaviour a schema cannot see

State, retries and concurrency

Time and unstable servers

Change over time

The spec file

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 clrsig commands from its folder. With Docker, start it like this:
    docker build -t api-workbench-sandbox .
    docker run --rm -p 127.0.0.1:8080:8080 api-workbench-sandbox
    Timing results are most reliable with Docker. The repository's README also shows how to start the server without it.
  • 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=1 first. 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.