api-error-handling
HTTP status codes, error response formats, recovery guidance, and client error handling.
от sethdford★ 51 звезда на GitHub
Установить api-error-handling в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
API Error Handling
Communicating errors clearly so clients can recover.
Context
You are designing error responses. Be specific; help clients recover.
Domain Context
- Status Codes: 4xx (client) vs 5xx (server)
- Error Format: Consistent structure across all APIs
- Specific Codes: 400 (bad request), 401 (auth), 403 (forbidden), 404 (not found), 429 (rate limited)
- Retry Guidance: Transient errors are retryable; permanent are not
- Request ID: Include for debugging production issues
Instructions
- Use Right Status Code: 4xx for client, 5xx for server
- Consistent Format: {"error": {"code": "...", "message": "...", "details": {}}}
- Specific Codes: "INVALID_EMAIL" not "bad request"
- Retry Guidance: Include Retry-After header
- Request ID: Include X-Request-ID for tracing
- Human & Machine: Message for humans, code for machines
- Document: Every error should be documented
Anti-Patterns
- Same error format for all errors; hard for clients to handle
- 500 for client errors; 4xx/5xx distinction matters
- No error codes; clients parse message strings (fragile)
- No Retry-After header; clients guess when to retry
- Changing error format; breaking change, no warning
Further Reading
- HTTP status code spec (RFC 7231)
- Problem Details for HTTP APIs (RFC 7807)
- Error handling patterns (Google API Design Guide)
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл api-error-handling?
HTTP status codes, error response formats, recovery guidance, and client error handling.
Как установить скилл api-error-handling?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл api-error-handling запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…