Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/handling-api-errors
Implement standardized error handling with proper HTTP status codes and error responses.
Passed 20 of 22 test cases with the skill, and 16 of 22 without it.
and 8 more in the full report
4 fixed16 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
Our Express backend currently returns inconsistent error formats—some routes send plain JSON strings while others leak raw database exceptions. We need a clean, standardized error handling system for our API. Please set up custom typed error classes, centralized error handling middleware that transforms exceptions into RFC 7807 problem details responses, an environment-based stack trace toggle, and a complete suite of unit tests to verify status codes and client payloads.
| Checked | Without skill | With skill |
|---|---|---|
| ValidationError uses HTTP status code 400. | Missed | Passed |
| AuthenticationError maps to HTTP status code 401. | Missed | Passed |
| Field-level validation error items include a code property. | Missed | Passed |
The instructions your model reads when the skill loads.
Implement standardized API error handling with RFC 7807 Problem Details responses, centralized error middleware, typed error classes, and environment-aware stack trace exposure. Convert framework exceptions, validation failures, database errors, and upstream service failures into consistent, machine-readable error responses with appropriate HTTP status codes.
try/catch blocks, error middleware, and exception handlers, identifying inconsistent error response formats across endpoints.type (URI identifying error type), title (human-readable summary), status (HTTP code), detail (specific explanation), and instance (request path).ValidationError (400), AuthenticationError (401), AuthorizationError (403), NotFoundError (404), ConflictError (409), and RateLimitError (429).field, message, and code properties.See ${CLAUDE_SKILL_DIR}/references/implementation.md for the full implementation guide.
${CLAUDE_SKILL_DIR}/src/errors/ - Typed error classes (ValidationError, NotFoundError, etc.)${CLAUDE_SKILL_DIR}/src/middleware/error-handler.js - Centralized error handling middleware${CLAUDE_SKILL_DIR}/src/errors/formatters.js - Error-to-RFC-7807 response transformation${CLAUDE_SKILL_DIR}/src/errors/codes.js - Error code registry with human-readable descriptions${CLAUDE_SKILL_DIR}/src/config/error-config.js - Environment-aware error detail configuration${CLAUDE_SKILL_DIR}/tests/errors/ - Error handling tests for each error type and scenario| Error | Cause | Solution |
test cases passed, vs 16 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.