error-handling-patterns

Implement Result types and error hierarchies for secure TypeScript HTTP responses.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/eykd/vance-ts --skill error-handling-patterns-eykd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling-patterns
Source: https://github.com/eykd/vance-ts/tree/main/.claude/skills/error-handling-patterns
Command: npx skills add https://github.com/eykd/vance-ts --skill error-handling-patterns-eykd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to implementing robust error handling in TypeScript applications, mitigating vulnerabilities and ensuring consistent error management.

Core Features & Use Cases

  • Result Types: Implement Result types for error-free control flow.
  • Error Hierarchy: Utilize a structured error hierarchy for clarity and maintainability.
  • HTTP Handling: Map errors to safe HTTP responses with clear user messages.
  • Use Case: Use this Skill to create a use case that handles errors gracefully, returning a Result type that the HTTP handler can then map to an appropriate response.

Quick Start

Use the error-handling-patterns skill to implement error handling in your TypeScript application by following the outlined patterns and principles.

Frequently Asked Questions about error-handling-patterns

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

FAQPage Schema
What is the best way to handle errors in TypeScript without exposing sensitive stack traces?

Robust TypeScript error handling uses structured error hierarchies and maps errors to safe HTTP responses with clear user messages, preventing error disclosure vulnerabilities and ensuring consistent management across application layers.

How do I implement Result types for error-free control flow in TypeScript?

Implementing Result types in TypeScript allows you to return explicit success or error states from functions, enabling error-free control flow that the HTTP handler can then map to an appropriate response without relying on exceptions.

How do I map application errors to safe HTTP responses in TypeScript?

Mapping errors to safe HTTP responses involves utilizing a structured error hierarchy and translating those errors into HTTP responses with clear user messages, preventing error disclosure vulnerabilities while ensuring consistent handling across layers.

Why do I need a structured error hierarchy in TypeScript applications?

A structured error hierarchy in TypeScript provides clarity and maintainability for error management, allowing you to create use cases that handle errors gracefully and return a Result type for consistent mapping to safe HTTP responses.

How to prevent error disclosure vulnerabilities in TypeScript HTTP handling?

Preventing error disclosure vulnerabilities requires mapping errors to safe HTTP responses with clear user messages, ensuring that internal application errors are caught by a structured hierarchy and securely translated for the client.