TL;DR
Remember: 2xx success, 3xx redirects, 4xx client errors (fix the request), 5xx server errors (check the server). Most common: 404, 403, 429, 500, 502, 504.
Classes
| Range | Meaning |
|---|---|
| 1xx | Informational |
| 2xx | Success |
| 3xx | Redirection |
| 4xx | Client error |
| 5xx | Server error |
Common Codes
| Code | Meaning | Debug |
|---|---|---|
| 200 | OK | Normal |
| 201 | Created | - |
| 204 | No Content | - |
| 301 / 302 | Permanent / temporary redirect | Check Location |
| 304 | Not Modified | Cache hit |
| 400 | Bad Request | Request format/params |
| 401 | Unauthorized | Missing/invalid token |
| 403 | Forbidden | Permissions, firewall, WAF |
| 404 | Not Found | Path/resource missing |
| 405 | Method Not Allowed | Wrong method |
| 429 | Too Many Requests | Rate limited; retry later |
| 500 | Internal Server Error | Check server logs |
| 502 | Bad Gateway | Upstream down |
| 503 | Service Unavailable | Overload/maintenance |
| 504 | Gateway Timeout | Upstream timeout |
Rules of Thumb
- 4xx: fix the request. 5xx: check the service.
- 403: check WAF/firewall/CDN before the app.
- 502/504: check upstream processes and ports first.
FAQ
What's the difference between 401 and 403?
401 means unauthenticated (missing token or login); 403 means authenticated but not allowed, or blocked by WAF/firewall/CDN — check those before the app when you see 403.
What do 502 and 504 mean?
502 Bad Gateway: the upstream (backend process/port) is down or returned an invalid response. 504 Gateway Timeout: the upstream took too long. Debug the upstream first, then the proxy config.
Is 404 always a server problem?
No. 404 means the path or resource is missing — check the request URL and routing first, then confirm the file or endpoint is actually deployed.
How do I handle 429?
429 is rate limiting: wait and retry, or reduce request frequency. If a CDN/WAF is limiting you, check the triggering rule.
Does 304 mean an error?
No. 304 Not Modified is a cache hit — the browser or proxy uses the local cache. It is not an error.
Sources
- MDN HTTP status documentation