What do the HTTP status-code classes mean, and which concrete status codes should a QA engineer recognize?
Answer
1xx is informational, 2xx successful, 3xx redirection/cache-related, 4xx a client/request-side problem, and 5xx a server/upstream problem. A QA engineer should recognize concrete codes rather than stop at the class: 200, 201, 202, 204, 301/302/307/308, 304, 400, 401, 403, 404, 405, 409, 412, 413, 415, 422, 429, 500, 501, 502, 503 and 504 are especially useful in day-to-day API testing.
Strong answer includes
- all five status-code classes
- concrete codes rather than only 2xx/4xx
- distinguishes client, server and gateway failures
Practical example
A POST returns 202 instead of 201. The tester does not report it immediately as wrong: 202 can be correct when the API accepts a job for asynchronous processing, while 201 would imply that resource creation has completed.