http-custom-errors

JSON →
library 8.0.0 ·javascript
verified May 27, 2026

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.

total hits 14
actors 6 distinct systems
last hit 2d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · DZ