Preparing for system design interviews?  Try bugzed.com →

HTTP Error Classes

JSON →
library 2.3.0 ·javascript abandoned
verified Jun 17, 2026

The `httperrors` package provides a collection of JavaScript Error classes corresponding to standard HTTP 4xx and 5xx status codes. It allows developers to create instances of these errors either by their numeric status code (e.g., `httpErrors(404)`) or by their UpperCamelCase name (e.g., `new httpErrors.NotFound('Resource not found')`). Each error instance includes the HTTP status code and exposes its CamelCased name as a boolean property, which simplifies error type checking in conditional statements without relying on `instanceof`. Originally designed for use with web frameworks like Express, it facilitates consistent error handling by associating a `statusCode` property with error objects, enabling middleware to set appropriate HTTP response codes. The package is currently at version 2.3.0, with its last update over seven years ago, indicating that it is no longer actively maintained.

total hits 13
actors 4 distinct systems
last hit 18d ago AhrefsBot
GPTBot
4
Amazonbot
4
Script
1

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