@agrippa-io/node-errors
v1.0.10
Published
NodeJs Error Library
Readme
@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