A realistic log is mostly 200s with a scattering of 404s. An incident log is mostly 500s. Both need testing, and the weighting control switches between them without changing anything else.
What you can control
- Three distributions: realistic, uniform, and an incident mode dominated by server errors.
Retry-Afterappears on 429 and 503, the two statuses where it is meaningful.- Optional structured error bodies with a machine-readable code and a request ID.
- Every status carries its class and reason phrase for building a legend or a filter.
Testing ideas
- Incident mode. Use the mostly-5xx distribution to test circuit breakers, retries and error banners.
- Retry-After. Include it for 429 and 503 and check your client waits instead of hammering the server.
- Error bodies. Turn on JSON error bodies to test how your UI surfaces server messages.
- Redirects. Include 3xx codes to check clients follow, or refuse to follow, as intended.
What this is not
Reason phrases follow the RFC. Many real APIs send custom ones, so a client that matches on the phrase rather than the numeric code is fragile regardless of what this generates.