Skip to content

xkcm/better-errors

Repository files navigation

Better Errors

Overview

Better Errors library provides a BetterError class based on the standard Error class. It extends the standard error with code and metadata properties. The library also contains a couple of utility functions & decorators to define default values to minimize repeated code and simplify writing custom errors.

Installation

You can install the package from NPM registry

# pnpm
pnpm add @xkcm/better-errors

# yarn
yarn add @xkcm/better-errors

# npm
npm add @xkcm/better-errors

Documentation

See full documentation at xkcm.github.io/better-errors