core-error-handling

Official

Standardize core errors for safer apps.

Authorzerobias-org
Version1.0.0
Installs0

System Documentation

What problem does it solve?

All modules MUST use core errors from @zerobias-org/types-core-js instead of generic TypeScript Error class. This guide provides the correct constructor patterns for each error type.

Core Features & Use Cases

  • Enforces consistent error types across HTTP clients, services, and backend logic.
  • Demonstrates common error constructors (InvalidCredentialsError, UnauthorizedError, NoSuchObjectError, InvalidInputError, RateLimitExceededError, UnexpectedError) and the recommended usage patterns, including mapping to HTTP statuses.
  • Includes a starter utility pattern and testing considerations to ensure uniform error handling across a codebase.

Quick Start

Integrate core error handling by replacing generic Errors with core errors and adding a central handler that maps API responses to the appropriate core error constructors.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: core-error-handling
Download link: https://github.com/zerobias-org/module/archive/main.zip#core-error-handling

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.