Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint: Production APIs

โญโญโญ advancedโณ 25 min read๐Ÿ“ Lesson 146 of 169

Prove you can contract-check, validate, and keep serving when dependencies wobble.

Write code that answers these three questions for a real service:

  1. When input is bad, does the client get every problem in one envelope-shaped answer โ€” with no internals leaked on 5xx?
  2. When load spikes, does the limiter throttle by the injected clock, not by wall-clock luck?
  3. When a dependency is down, does readiness say so without crashing?

The challenge below combines 2 and 3: a readiness probe whose checks are injected zero-arg callables. A check that raises is a dependency that is down โ€” that must mark the service not ready (and appear as false), never crash the probe and never count as healthy.