error-handling

Implement consistent error handling patterns for TypeScript/Node applications.

Updated Jan 25, 2026
One-click install
npx skills add https://github.com/erhankaraarslan/agent_yazilim_ekibi --skill error-handling-erhankaraarslan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/erhankaraarslan/agent_yazilim_ekibi/tree/main/.claude/skills/error-handling
Command: npx skills add https://github.com/erhankaraarslan/agent_yazilim_ekibi --skill error-handling-erhankaraarslan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes robust error handling patterns for application code.

Core Features & Use Cases

  • Error hierarchy & custom errors: Define AppError and specific errors (NotFound, Validation, Unauthorized, etc.) to provide consistent failure semantics.
  • Safe error handling in code: Use proper try-catch blocks, transformation, and rethrow strategies to avoid swallowing errors.
  • Global and frontend handling: Central Express error handler and a React Error Boundary to ensure safe user-facing error reporting.

Quick Start

Use the error-handling skill to implement consistent error handling in a new API service.

Frequently Asked Questions about error-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement global error handling in Express and TypeScript?

Global error handling in Express requires a centralized error-handling middleware. This Skill provides a standard Express handler to catch unified application errors, apply consistent error semantics, and format user-facing responses.

What is the best way to structure custom error classes in Node applications?

Structuring custom error classes involves defining a base AppError and specific extensions like NotFound or Validation. This pattern ensures consistent failure semantics and safe logging across API services and microservices.

How does a frontend error boundary work with unified API error codes?

A frontend error boundary catches rendering exceptions in React components. Paired with conventional error codes from backend APIs, it ensures safe, unified user-facing error reporting during application failures.

How do I avoid swallowing exceptions when using async wrappers in TypeScript?

Avoiding swallowed exceptions requires using async wrappers to apply proper try-catch blocks. This pattern transforms and rethrows errors safely, ensuring contextual logging without losing failure semantics.

Can I use this error handling pattern for both microservices and UI components?

Yes, this pattern targets both backend API services and frontend applications. It standardizes failure handling across microservices and UI components using conventional error codes and unified user feedback.