Skip to content

Glossary: JavaScript Beyond the Basics

cause

Also written: error cause, { cause }

An option passed as the second argument to an error's constructor to keep the original error when you wrap it in a higher-level one. It's read later from `error.cause`.

Where the book teaches it

Related terms

Error classes (custom)