error-handling-patterns
Installation
SKILL.md
Error Handling Patterns
Core Principles
- Fail fast - Detect and report errors early
- Fail safely - Errors shouldn't crash the application
- Fail informatively - Provide actionable error messages
- Recover gracefully - Handle expected failures
Custom Error Classes
// Base application error
export class AppError extends Error {
constructor(
message: string,
public readonly code: string,
public readonly statusCode: number = 500,
public readonly details?: unknown
Related skills
More from autohandai/community-skills
tailwind-ui-patterns
Tailwind CSS v4 patterns, component styling, and responsive design
159typescript-refactoring-patterns
Expert TypeScript refactoring patterns for cleaner, type-safe code
58python-fastapi-patterns
FastAPI best practices, async patterns, and Pydantic validation
45api-design-restful
RESTful API design patterns, error handling, and documentation
31cli-tool-development
Build professional CLI tools with Node.js, commander, and Ink
16nextjs-app-router-mastery
Next.js 14+ App Router patterns, server components, and data fetching
15