http-custom-errors
JSON →Custom error classes for all HTTP status codes (4xx and 5xx) in Node.js. Current stable version is 8.0.0, released periodically with low churn. Unlike generic error packages, it provides individual constructors for each status code (e.g., NotFoundError, ForbiddenError) and a factory function createHTTPError(code) that returns the correct error class by numeric status. Errors have code and status properties matching the HTTP status. This library is designed for use with Express.js error-handling middleware. It supports CommonJS only and has no runtime dependencies.
Traffic · last 30 days ↓60% vs prev 7d
total hits 14
actors 6 distinct systems
last hit 2d ago AhrefsBot
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · DZ
Resources
API endpoints
full doc /v1/registry/http-custom-errors
compatibility /v1/registry/http-custom-errors/compatibility