error-handling

Resolves floating promises, silent catches, and non-Error throws in TypeScript/JavaScript codebases.

4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill error-handling-mgd34msu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/mgd34msu/goodvibes-gemini/tree/main/skills/error-handling
Command: npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill error-handling-mgd34msu

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses common and critical error handling issues in TypeScript/JavaScript, preventing silent failures, lost stack traces, and application crashes.

Core Features & Use Cases

  • Fixes Floating Promises: Ensures asynchronous operations are properly awaited or handled to prevent unhandled rejections.
  • Eliminates Silent Catches: Guarantees that errors caught are logged with context, aiding debugging.
  • Enforces Error Object Usage: Promotes throwing Error objects or custom error classes for better stack traces and type checking.
  • Use Case: When your Node.js application unexpectedly crashes due to an unhandled promise rejection, or when bugs are hard to track down because errors are swallowed, this Skill provides the patterns and tools to fix these issues.

Quick Start

Use the error-handling skill to identify and fix floating promises in the file '/path/to/your/code.ts'.

Frequently Asked Questions about error-handling

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

FAQPage Schema
How do I fix floating promises in TypeScript to prevent unhandled rejections?

To fix floating promises in TypeScript, you must ensure asynchronous operations are properly awaited or handled with catch blocks to prevent unhandled rejections. This skill identifies those promises and provides patterns to resolve them.

Why does throwing non-Error objects cause lost stack traces in JavaScript?

Throwing non-Error objects in JavaScript causes lost stack traces because the runtime cannot attach call stack information to plain objects. Enforcing the use of Error objects or custom error classes preserves stack traces for debugging.

What is the best way to eliminate silent catch blocks in a Node.js application?

The best way to eliminate silent catch blocks in Node.js is to ensure caught errors are logged with contextual information. This skill provides specific patterns to guarantee errors are captured for debugging instead of being swallowed.

How do I implement custom error classes and result types in TypeScript?

Implementing custom error classes and result types in TypeScript involves creating specialized Error subclasses and structured return objects. This skill uses code examples to guide developers in applying these robust error management strategies.

Can I use this error handling approach for JavaScript codebases or is it TypeScript only?

You can use this error handling approach for both JavaScript and TypeScript codebases. The skill resolves common error handling deficiencies across both languages, addressing floating promises, silent catches, and non-Error object throws.