</>PackageGraphPackageGraph

http-errors

npmv2.0.1

Create HTTP error objects

Safe to adopt

Yes — http-errors scores well across adoption, maintenance, weight, supply chain, and licensing. 149.4M downloads per week and 7 known dependents. Last published 293 days ago.

  • AAdoption: grade A, Excellent.

    149.4M downloads per week and 7 known dependents.

  • BMaintenance: grade B, Good.

    Last published 293 days ago.

  • AWeight: grade A, Excellent.

    Pulls in 5 transitive packages, about 70 KB installed.

  • ASupply chain: grade A, Excellent.

    No install scripts, 4 maintainers, and a contained dependency surface.

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding http-errors to a project.

5
Direct dependencies

Runtime packages this one declares itself.

5
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

70 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

ISCMIT

Every license you inherit by installing http-errors, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
node >= 0.8
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the http-errors README.

var createError = require('http-errors')
var express = require('express')
var app = express()

app.use(function (req, res, next) {
  if (!req.user) return next(createError(401, 'Please login to view this page.'))
  next()
})

http-errors vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
http-errorsthis page149.4M7MIT9 months ago
content-type191.4M6MIT1 day ago
negotiator183.3M2MIT1 day ago
node-fetch172.9M9MIT1 day ago
undici158.5M15MIT1 day ago
axios106.5M4MIT1 day ago

Dependencies

Declared by http-errors v2.0.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (9)

eslint 7.32.0eslint-config-standard 14.1.1eslint-plugin-import 2.32.0eslint-plugin-markdown 2.2.1eslint-plugin-node 11.1.0eslint-plugin-promise 5.2.0eslint-plugin-standard 4.1.0mocha 9.1.3nyc 15.1.0

Used by

Popular packages that depend on http-errors.

Relationship graph

Dependencies (left) and dependents (right) of http-errors.

Frequently installed together

Release history

1 release in the last two years, typically about 123 days apart.

Recent versions of http-errors
VersionPublishedSizeLicense
2.0.1latest9 months ago19 KBMIT
2.0.04 years ago18 KBMIT
1.8.14 years ago18 KBMIT
1.8.06 years ago18 KBMIT
1.7.37 years ago17 KBMIT
1.7.27 years ago17 KBMIT
1.7.18 years ago17 KBMIT
1.7.08 years ago17 KBMIT
1.6.38 years ago15 KBMIT
1.6.29 years agoMIT
1.6.19 years agoMIT
1.6.09 years agoMIT
1.5.19 years agoMIT
1.5.010 years agoMIT
1.4.010 years agoMIT

Overview

http-errors is an npm package that create HTTP error objects. It is extremely widely used, with about 149.4M downloads per week and 7 known dependents in the graph. The latest version is 2.0.1, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need create HTTP error objects and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (149.4M weekly downloads).
  • Clear open-source license (MIT).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Funding

Frequently asked questions

Should I use http-errors?

Yes — http-errors scores well across adoption, maintenance, weight, supply chain, and licensing. 149.4M downloads per week and 7 known dependents. Last published 293 days ago.

How do I install http-errors?

Run `npm install http-errors` to add http-errors to your npm project.

How many dependencies does http-errors have?

http-errors declares 14 direct dependencies and pulls in 5 packages in total once its runtime tree is resolved totalling about 70 KB on disk.

What license is http-errors released under?

http-errors is distributed under the MIT license. Its dependency tree also includes: ISC, MIT.

How popular is http-errors?

http-errors has approximately 149,403,825 downloads per week and 7 known dependent packages.

Is http-errors still maintained?

The most recent release of http-errors (v2.0.1) was published 9 months ago.

Does http-errors run install scripts?

No. http-errors does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.