http-errors
http-errors copied to clipboard
Create HTTP Errors
This adds a test to assert on behavior outlined in the docs but not captured in the test suite. https://github.com/jshttp/http-errors?tab=readme-ov-file#createerrorstatus-error-properties > ### createError([status], [error], [properties]) > > Extend the given...
To allow better interoperability with ES6 classes (which are forced to call the super() constructor) it is better to add the following condition to the HttpError constructor: ```js if (this.constructor...
Includes the status code in the deprecation warning. It also adds a test to check if the warning is emitted.
Question: would it be possible to include the typescript typings, which are currently available via @types/http-errors, directly into the package? And by that, also provide for commonjs default export support?
disclaimer: i created the suggested module. also open for other suggestions, but I couldn't find any other modules like this out there.
Fixes https://github.com/jshttp/http-errors/issues/110 and https://github.com/jshttp/http-errors/issues/98 This converts the `HttpError` constructor function to a real class and the constructor factories to use subclasses. This removes the need for `inherits`. `setprototypeof` wasn't needed...
This pull request updates the Node.js versions tested in the CI workflow to include newer releases.
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.25.3 to 2.31.0. Release notes Sourced from eslint-plugin-import's releases. v2.31.0 Added support eslint v9 (#2996, thanks [@G-Rath] [@michaelfaith]) order: allow validating named imports (#3043, thanks [@manuth]) extensions:...
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.3 to 9.2.2. Release notes Sourced from mocha's releases. v9.2.2 9.2.2 / 2022-03-11 Please also note our announcements. :bug: Fixes #4842: Loading of reporter throws wrong error...