add-error-type

Community

Define domain-specific errors with ease.

Authormadooei
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill enables teams to extend the domain error surface by introducing custom errors that integrate with the existing BaseError hierarchy and automatic HTTP status mapping, reducing boilerplate and improving consistency.

Core Features & Use Cases

  • Create a new error class that extends BaseError and defaults to a meaningful HTTP status via errorCode
  • Reuse and standardize common error types (e.g., BadRequestError, NotFoundError) across services
  • Apply business-rule validation across controllers and services with clear, actionable error messages

Quick Start

Create a new error class extending BaseError, implement it in your service layer, and throw it when a business rule is violated.

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: add-error-type
Download link: https://github.com/madooei/backend-template/archive/main.zip#add-error-type

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 223,000+ vetted skills library on demand.