{"library":"http-errors","type":"library","category":null,"description":"http-errors is a utility library for Node.js environments that simplifies the creation of standardized HTTP error objects, making it easier to integrate consistent error handling into web frameworks like Express, Koa, and Connect. The current stable version, 2.0.1, supports Node.js versions 10 and above and offers both CommonJS and ES module exports. The package maintains a stable release cadence with updates focused on maintenance and minor improvements. It provides a declarative API to generate HTTP errors with appropriate status codes, messages, and optional properties such as `expose` (for client visibility) and `headers`. Key differentiators include its simple factory function (`createError`) and direct constructors for common HTTP status codes (e.g., `createError.NotFound`), abstracting the complexity of managing HTTP-specific error properties.","language":"javascript","status":"active","version":"2.0.1","tags":["javascript","http","error"],"last_verified":"Wed May 27","install":[{"cmd":"npm install http-errors","imports":["import createError from 'http-errors';","import { NotFound } from 'http-errors';\nconst err = new NotFound('Resource not found');","import { isHttpError } from 'http-errors';"]},{"cmd":"yarn add http-errors","imports":[]},{"cmd":"pnpm add http-errors","imports":[]}],"homepage":null,"github":"https://github.com/jshttp/http-errors","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/http-errors","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-errors/compatibility"}}