Command Palette

Search for a command to run...

Назад к скиллам
скилл № 17490

api-error-handling

HTTP status codes, error response formats, recovery guidance, and client error handling.

БесплатноБез исполняемых скриптов
sethdfordот 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

  1. Use Right Status Code: 4xx for client, 5xx for server
  2. Consistent Format: {"error": {"code": "...", "message": "...", "details": {}}}
  3. Specific Codes: "INVALID_EMAIL" not "bad request"
  4. Retry Guidance: Include Retry-After header
  5. Request ID: Include X-Request-ID for tracing
  6. Human & Machine: Message for humans, code for machines
  7. 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), без исполняемых скриптов.

Похожие скиллы

Сравнить api-error-handling с