/api-error-handling
Implements standardized API error responses with proper status codes, logging, and user-friendly messages. Use when building production APIs, implementing error recovery patterns, or integrating error monitoring services.
One skill from claude-skills.
shell
$ npx -y skills add secondsky/claude-skills --skill api-error-handling --agent claude-codeInstalls just this skill. Get the whole plugin for auto-invocation.
How it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/api-error-handling
Context preview
The summary Claude sees to decide when to auto-load this skill.
Implements standardized API error responses with proper status codes, logging, and user-friendly messages. Use when building production APIs, implementing error recovery patterns, or integrating error monitoring services.
Stats
Stars194
Forks29
LanguageTypeScript
LicenseMIT
Ships with claude-skills
SKILL.md
api-error-handling.SKILL.md
--- name: api-error-handling description: Implements standardized API error responses with proper status codes, logging, and user-friendly messages. Use when building production APIs, implementing error recovery patterns, or integrating error monitoring services. license: MIT --- # API Error Handling Implement robust error handling with standardized responses and proper logging. ## Standard Error Response Format ```json { "error": { "code": "VALIDATION_ERROR", "message": "Invalid request parameters", "status": 400, "requestId": "req_abc123", "timestamp": "2025-01-15T10:30:00Z", "details": [ { "field": "email", "message": "Invalid email format" } ] } } ``` ## Error Class (Node.js) ```javascript class ApiError extends Error { constructor(code, message, status = 500, details = null) { super(message); this.code = code; this.status = status; this.details = details; } static badRequest(message, details) {
