@chubbyts/chubbyts-http-error

2.3.1 • Public • Published

chubbyts-http-error

CI Coverage Status Infection MSI npm-version

bugs code_smells coverage duplicated_lines_density ncloc sqale_rating alert_status reliability_rating security_rating sqale_index vulnerabilities

Description

Creates http error which can be catched and converted to error responses.

Requirements

  • node: 16

Installation

Through NPM as @chubbyts/chubbyts-http-error.

npm i @chubbyts/chubbyts-http-error@^2.3.1

Usage

import { createNotFound } from '@chubbyts/chubbyts-http-error/dist/http-error';

try {
  throw createNotFound({ detail: 'Something went wrong', instance: 'server-1', otherKey: 'otherValue' });
} catch (e) {
  console.log(e);
}

Copyright

2023 Dominik Zogg

Package Sidebar

Install

npm i @chubbyts/chubbyts-http-error

Weekly Downloads

165

Version

2.3.1

License

MIT

Unpacked Size

28.8 kB

Total Files

6

Last publish

Collaborators

  • dominikzogg