Skip to content

Repository files navigation

@agrippa-io/node-errors

Typed error classes for Agrippa Node.js services. Every error extends ErrorAPI, which carries an HTTP status and is mapped to an HTTP response by the services' error-handling middleware.

Usage

import { ErrorBadRequest, ErrorResourceNotFound } from '@agrippa-io/node-errors'

throw new ErrorResourceNotFound('User not found')

Conventions

Follows the standard node-service-template TypeScript setup: CommonJS, strict type-checking, src/* path aliases (rewritten by tsc-alias at build), ESLint flat config (no semicolons), and Vitest.

Scripts

npm run build       # tsc + tsc-alias -> dist/
npm test            # vitest
npm run lint        # eslint
npm run typecheck   # tsc --noEmit

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages