Creates http error which can be catched and converted to error responses.
npm install @chubbyts/chubbyts-http-error














Creates http error which can be catched and converted to error responses.
* node: 18
Through NPM as [@chubbyts/chubbyts-http-error][1].
``ts`
npm i @chubbyts/chubbyts-http-error@^3.1.2
`ts
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);
}
``
2026 Dominik Zogg
[1]: https://www.npmjs.com/package/@chubbyts/chubbyts-http-error
[2]: https://web-frameworks-benchmark.netlify.app/result
[3]: https://www.php-fig.org/psr/psr-15
[4]: https://www.npmjs.com/package/@chubbyts/chubbyts-dic-types
[5]: https://www.npmjs.com/package/@chubbyts/chubbyts-http-types
[6]: https://www.npmjs.com/package/@chubbyts/chubbyts-log-types