200 OK

The request succeeded and the response body carries the result. It is the default success code — and also the most abused one: APIs that return 200 with {"error": ...} in the body break every layer of tooling that trusts status codes (monitoring, caching, retries).

What usually causes it

  • A normal successful GET/POST/PUT
  • An API that tunnels errors inside 200 responses (an antipattern worth fixing)

How to debug and fix it

  1. If the body contains an error despite the 200, treat it as a server-side bug: map application errors to real 4xx/5xx codes.
  2. For monitoring, never alert on status alone if any upstream tunnels errors in 200s — parse the body or fix the API.
  3. Where the response should be empty (deletes, updates), prefer 204 to a 200 with an empty body.

Easily confused with