Skip to content

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

License

Notifications You must be signed in to change notification settings

chubbyts/chubbyts-http-error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e50d9c5 · Mar 4, 2025

History

28 Commits
Mar 4, 2025
Mar 4, 2025
Jun 18, 2024
Jun 2, 2022
Jan 3, 2025
Mar 4, 2025
Jan 3, 2025
Jan 3, 2025
Mar 4, 2025
Jun 2, 2022
Jun 18, 2024
Jan 3, 2025
Jul 25, 2023
Jun 18, 2024

Repository files navigation

chubbyts-http-error

CI Coverage Status Mutation testing badge 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: 18

Installation

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

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

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

2025 Dominik Zogg

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published