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.
Sources
- MDN HTTP status documentation
最后更新:2026-08-02