HTTP Errors Enhanced
JSON →`http-errors-enhanced` is a JavaScript and TypeScript library for creating standardized HTTP error objects with additional properties. It extends the native `Error` class, providing a base `HttpError` class, specific error classes (e.g., `NotFoundError`), and a `createError` factory function. Currently stable at version 4.0.2, the library typically sees patch and minor updates for bug fixes and dependency upgrades, with major versions primarily dropping support for older Node.js runtimes. Key differentiators include its explicit support for attaching arbitrary additional properties to errors, automatic HTTP status code descriptions, `Error.cause` support since v3, and an `expose` property for controlling client visibility. It is designed to be framework-agnostic, allowing for consistent error handling across different environments. The library is ESM-only and ships with TypeScript types.
Traffic · last 30 days
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada · 🇫🇷 France · 🇺🇦 Ukraine