详细分析 ▾
运行时依赖
版本
- **http-status** 初始版本:一个即时、离线的所有HTTP状态码参考。- 提供任何标准或非官方代码的含义、常见原因和修复建议查询。- 涵盖RFC、WebDAV、Nginx、Cloudflare和其他常用代码。- 支持单一代码解释、代码比较(如401 vs 403)以及可重试错误列表。- 无网络、无依赖——完全离线工作。
安装命令
点击复制技能文档
任何HTTP状态码的即时查询——含义、常见原因以及如何修复。完整数据表见 references/codes.md。零依赖,完全离线。
使用场景
- "429是什么意思?"
- "我的API返回502,出什么问题了?"
- "401和403有什么区别?"
- "哪些5xx错误可以重试?"
- "Cloudflare 524是什么意思?"
代码范围(快速定位)
1xx 信息性 — 请求已收到,继续处理
2xx 成功 — 请求已被接收、理解、接受
3xx 重定向 — 需要进一步操作才能完成请求
4xx 客户端错误 — 请求包含语法错误或无法完成
5xx 服务器错误 — 服务器无法完成明显有效的请求
查询流程
- 在
references/codes.md中查找精确代码 - 如果未找到,从范围推断(4xx = 客户端错误,5xx = 服务器错误)
- 注明来源类别:RFC标准 / WebDAV / Nginx / Cloudflare / 非官方
- 返回:含义 + 常见原因 + 建议操作
输出格式
单一代码查询
🔢 HTTP 429 — Too Many Requests ━━━━━━━━━━━━━━━━━━━━ Category: 4xx Client Error Standard: RFC 6585 Meaning: The user has sent too many requests in a given time (rate limiting).Common causes: • API rate limit exceeded • Burst traffic hitting a throttling policy • Forgot to handle Retry-After header
What to do: • Check the Retry-After response header for wait time • Implement exponential backoff in your client • Review your request frequency and add throttling logic • Consider caching responses to reduce request volume
Related codes: 503 (server overloaded)
比较查询
🔢 401 vs 403 ━━━━━━━━━━━━━━━━━━━━401 Unauthorized → Authentication is required and has failed or not been provided → "You need to log in first" → Fix: provide valid credentials / token
403 Forbidden → Server understood the request but refuses to authorize it → "You're logged in but don't have permission" → Fix: check user roles/permissions, contact admin
Key difference: 401 = identity unknown (not authenticated) 403 = identity known but access denied (not authorized)
可重试代码
✅ Generally safe to retry (with backoff):408 Request Timeout 429 Too Many Requests ← respect Retry-After header 500 Internal Server Error ← transient server issues 502 Bad Gateway ← upstream temporarily unavailable 503 Service Unavailable ← server overloaded/maintenance 504 Gateway Timeout ← upstream timeout
❌ Do NOT retry blindly:
400 Bad Request ← fix your request first 401 Unauthorized ← re-authenticate first 403 Forbidden ← retrying won't help 404 Not Found ← resource doesn't exist 422 Unprocessable Entity ← fix validation errors first
注意事项
- 有关Nginx特定代码(444、494-499)和Cloudflare代码(520-530),请参阅
references/codes.md - 418 "I'm a teapot" 是RFC 2324的真实状态码——在某些服务器中作为彩蛋实现
- 某些代码(如103、425、451)较新,可能并非所有客户端/代理都支持