make-error-cause simplifies creating custom error classes that support an Error.cause property. This property allows you to chain errors, preserving the underlying cause of a failure, which is invaluable for debugging. It provides a constructor function that accepts a short error name and options for custom properties. The resulting error classes are then extended using standard class extends syntax, yielding type-safe and well-documented errors with nested cause information. Its straightforward API allows for clean and effective error handling.
The npm package make-error-cause was actively updated between December 2015 and November 2019, with releases occurring sporadically. Version 1 saw updates in 2015 and 2016, followed by version 2 between 2018 and 2019. Since November 2019, there have been no new releases.
make-error-cause npm package downloads generally remained around 2 million from March 2024 to August 2025. There was a spike in June and July 2025, exceeding 2.5 million downloads. September 2025 is not complete but shows a significant increase.