error-handling

Implement consistent error handling with custom error classes and structured JSON responses.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill ensures your applications handle errors gracefully and consistently, preventing data leaks and providing clear feedback to users and systems.

Core Features & Use Cases

  • Structured Error Responses: Define a consistent JSON format for all API errors.
  • Custom Error Classes: Create reusable error types with specific codes and messages.
  • Logging & Monitoring: Differentiate between operational and programming errors for better debugging.
  • Use Case: When a user tries to access a resource that doesn't exist, the API returns a standardized RESOURCE_NOT_FOUND error, preventing internal details from being exposed and allowing the frontend to display a user-friendly message.

Quick Start

Implement consistent error handling with custom error classes, error boundaries, and structured error responses.

Frequently Asked Questions about error-handling

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

FAQPage Schema
How do I implement structured API error responses to prevent internal detail leakage in production?

Structured API error responses enforce a consistent JSON format and standardized error codes like RESOURCE_NOT_FOUND, preventing internal details from being exposed while allowing the frontend to display user-friendly messages in production environments.

How do I differentiate operational errors from programming errors for application logging?

Differentiating operational errors from programming errors for logging involves categorizing expected failures separately from unexpected bugs, enabling better debugging and monitoring by applying differentiated logging strategies across your application.

What is the best way to create custom error classes in TypeScript and Python for exception management?

Creating custom error classes for exception management in TypeScript and Python involves defining reusable error types with specific codes and messages, ensuring consistent error handling strategies and structured responses across your application.

How do I propagate request IDs through API errors for consistent tracking?

Propagating request IDs through API errors requires enforcing invariants for API error formats, ensuring the request ID travels within the structured error response to maintain consistent tracking across distributed systems.

Can I use this error handling approach for both Python and TypeScript applications?

Yes, you can apply this error handling approach to both Python and TypeScript applications, as the strategy implements custom error classes, structured responses, and differentiated logging across multiple languages for robust application consistency.