{"library":"http-error-constructor","type":"library","category":null,"description":"This `http-error-constructor` package provides a straightforward way to create HTTP-specific error objects in Node.js applications. Currently at version 0.1.0, it appears to be an early-stage or unmaintained library given its low version number and the explicit requirement for Node.js >= 4.0.0, which was released in 2015. The library offers a main `HttpError` constructor that can accept a status code, a message, and additional properties. A key feature is the dynamic creation of specific error constructors, such as `HttpError.BadRequest` or `HttpError[400]`, making error instantiation semantically clear and readable. It automatically assigns the correct HTTP status message based on the provided code and ensures core properties like `name`, `statusCode`, and `status` are non-enumerable, leading to their exclusion from default `JSON.stringify` output, while custom properties are included. The library's release cadence is unknown, but its age indicates it predates widespread ECMAScript Modules (ESM) adoption.","language":"javascript","status":"abandoned","version":"0.1.0","tags":["javascript","http","error","constructor"],"last_verified":"Wed May 27","install":[{"cmd":"npm install http-error-constructor","imports":["const HttpError = require('http-error-constructor');","const HttpError = require('http-error-constructor');\nconst err = new HttpError.BadRequest('Validation failed');","const HttpError = require('http-error-constructor');\nconst err = new HttpError[400]('Bad Request');"]},{"cmd":"yarn add http-error-constructor","imports":[]},{"cmd":"pnpm add http-error-constructor","imports":[]}],"homepage":null,"github":"https://github.com/Jokero/http-error-constructor","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/http-error-constructor","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/http-error-constructor/compatibility"}}