handling-errors-typescript

Installation
SKILL.md

Handling Errors TypeScript

When to use

  • Creating new error types for a feature
  • Mapping internal errors to HTTP responses
  • Reviewing try/catch usage to eliminate swallowed errors

Core rules

  1. All errors extend AppError base class
  2. Expected business failures: return Result<T,E> (don't throw)
  3. Unexpected errors (programmer errors, infra outages): throw only these
  4. Never swallow errors: no empty catch, no console.log(e)
  5. All catch blocks must handle or rethrow explicitly
  6. Error types: BusinessError, NotFoundError, ValidationError, UnauthorizedError, ForbiddenError, ConflictError, InfrastructureError

Reference shape (TypeScript)

Installs
2
GitHub Stars
1
First Seen
Aug 22, 2026
handling-errors-typescript — j4flmao/agent_skills_nodejs_nestjs