What problem does it solve? Node.js APIs often end up with scattered try/catch blocks, inconsistent error responses, and leaked stack traces in production. This Skill provides a complete pattern for centralizing error handling in Fastify so services throw domain errors and one handler maps them to consistent HTTP responses. ## Core Features & Use Cases - Custom Error Class Hierarchy: Build an AppError base class with statusCode, code, and isOperational flags, plus subclasses like NotFoundError, ValidationError, UnauthorizedError, ForbiddenError, and ConflictError. - Centralized Fastify Error Handler: Configure setErrorHandler and setNotFoundHandler to map Zod validation errors, Prisma error codes (P2002, P2025), and unknown errors to proper HTTP responses. - Consistent Error Response Shape: Return RFC 7807-inspired responses with machine-readable code, human-readable message, and optional field-level details, while hiding stack traces in production. - Use Case: When building a Fastify + Prisma + Zod API, use this Skill to set up the full error layer so a duplicate database record automatically returns a 409 Conflict and a failed Zod parse returns a 400 with per-field messages. ## Quick Start Set up centralized error handling in my Fastify app with custom error classes, a global setErrorHandler, and consistent error response shapes.