abrahamvilchesdelacruz/ididntcatchthat/api-error-handler
Claude Code and agent skill by abrahamvilchesdelacruz/ididntcatchthat
- community
Checking that the SKILL.md file is still in the repository.
Convenciones de manejo de errores HTTP en la API: GlobalExceptionRegistry, filtros por módulo y HttpExceptionFilter. Trigger: Al crear domain errors, al registrar excepciones en un módulo, o al configurar el filtro HTTP en apps/api/.
Install
npx vskill@latest install abrahamvilchesdelacruz/ididntcatchthat/api-error-handlerSKILL.md
The same SKILL.md was published earlier as abrahamvilchesdelacruz/ididntcatchthat/api-error-handler.
When to Use
- Al crear un nuevo domain error que debe mapearse a un HTTP status
- Al añadir un nuevo módulo con sus propias excepciones
- Al configurar el filtro global de excepciones
Usa el template deassets/exception-registry.template.mdal crear el registry de un nuevo BC.Leereferences/docs.mdpara el formato del error envelope y docs externos.
Critical Patterns
Arquitectura del sistema de errores
Principio: cada módulo es responsable de registrar sus propios errores. El mantenimiento va donde vive el código.
GlobalExceptionRegistry — shared
HttpExceptionFilter — shared
Exception Registry por módulo
Uno por feature, en infrastructure/framework/. Se registra en onModuleInit().
Registrarlo como provider en el módulo:
HTTP status por tipo de error de dominio
| Tipo de error | HTTP Status | |
|---|---|---|
Entidad no encontrada (NotFound) | 404 NOT_FOUND | |
Campo inválido / vacío (Empty, Invalid) | 422 UNPROCESSABLE_ENTITY | |
Conflicto de estado (AlreadyExists, InvalidStatus) | 409 CONFLICT | |
Acción no permitida (CannotX) | 400 BAD_REQUEST | |
| Sin permisos | 403 FORBIDDEN | |
| Credenciales inválidas / token expirado | 401 UNAUTHORIZED | |
Límite de uso superado (LimitExceeded) | 429 TOO_MANY_REQUESTS |
Reglas
- El domain error nunca conoce el HTTP status — eso es responsabilidad de infrastructure
- Un
ExceptionRegistrypor módulo — nunca un registry global con todos los errores - El registry se inicializa en
onModuleInit()— garantiza que está listo antes de que lleguen requests - Usar
exception.constructor.namecomo key — funciona aunque el bundle minifique, porque los nombres de clase son explícitos
Anti-patterns
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/api-error-handler/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/abrahamvilchesdelacruz/ididntcatchthat/api-error-handler)