integra-error-handling

Guide structured try-catch, custom error classes, and logging in JavaScript and TypeScript codebases.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Integra-Beauty/integra-conventions --skill integra-error-handling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integra-error-handling
Source: https://github.com/Integra-Beauty/integra-conventions/tree/main/skills/integra-error-handling
Command: npx skills add https://github.com/Integra-Beauty/integra-conventions --skill integra-error-handling

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides structured guidance for implementing robust error handling in TypeScript/JavaScript codebases, covering patterns for try-catch, custom errors, and effective logging to reduce runtime failures.

Core Features & Use Cases

  • Guidance on designing small, focused try blocks, adding meaningful custom error classes, and avoiding error translation.
  • Real-world patterns including nested error handling, proper error logging, and maintaining explicit fallbacks.
  • Use case: apply these principles to serverless handlers, services, and utilities to produce predictable error behavior and easier debugging.

Quick Start

Refactor existing error-handling code to use small try blocks, custom error classes, and consistent error logging per the integra-error-handling guidelines.

Frequently Asked Questions about integra-error-handling

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

FAQPage Schema
What is the best way to handle errors in TypeScript services?

The best way to handle errors in TypeScript is to use small, focused try-catch blocks, define custom error classes, and apply consistent logging to enforce explicit error semantics and avoid error translation.

How do I create custom error classes in JavaScript for consistent logging?

To create custom error classes in JavaScript for consistent logging, define specialized error semantics that propagate clearly through your services, ensuring minimal catch blocks and structured error data for easier debugging.

Why should I avoid error translation in nested try-catch blocks?

You should avoid error translation in nested try-catch blocks because it obscures the original error context, making debugging harder; instead, maintain explicit error propagation and rely on structured custom errors for predictable behavior.

Can I use these error handling patterns for serverless handlers?

Yes, you can apply these structured error handling patterns to serverless handlers, services, and utilities to produce predictable error behavior, maintain explicit fallbacks, and facilitate easier debugging in serverless environments.

When do I need custom error classes versus standard try-catch in TypeScript?

You need custom error classes instead of standard try-catch when your codebase requires explicit error semantics and clear propagation guidelines across services, ensuring that caught errors are logged consistently without being translated.