tsentials-errors

Community

Create typed error values for TypeScript

Authorsenrecep
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves the problem of handling errors as structured, typed values instead of untyped exceptions, so your application can return consistent error codes, descriptions, and metadata across sync and async flows.

Core Features & Use Cases

  • Create rich AppError values using Err factories for failure, validation, notFound, conflict, unauthorized, forbidden, and unexpected outcomes.
  • Attach and manage error metadata with ErrorMetadata as a ReadonlyMap, generated from plain records or caught exceptions.
  • Convert exceptions into typed errors via Err.fromException and optionally override both the error type and code.
  • Combine and compare errors using Err.combine (collect multiple AppErrors) and Err.equals (structural equality by code/description/type).

Quick Start

Use the tsentials-errors skill to define an AppError for a failing request by calling Err.validation('User.InvalidAge', 'Must be 18+', ErrorMetadata.fromRecord({ field: 'age', value: 15 })).

Dependency Matrix

Required Modules

None required

Components

assets

💻 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: tsentials-errors
Download link: https://github.com/senrecep/tsentials/archive/main.zip#tsentials-errors

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.