Error causeBaseline · Widely available
The cause property of errors records the specific original cause of the error, particularly for errors that have been re-thrown.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 20, 2021. Widely available since Mar 20, 2024.
Browser support
DesktopChrome
1–92Not supported
93+Supportedsince Aug 31, 2021
Current: 155Edge
12–92Not supported
93+Supportedsince Sep 2, 2021
Current: 154Firefox
1–90Not supported
91+Supportedsince Aug 10, 2021
Current: 157Safari
1–14.1Not supported
15+Supportedsince Sep 20, 2021
Current: 27MobileChrome Android
18–92Not supported
93+Supportedsince Aug 31, 2021
Current: 155Firefox Android
4–90Not supported
91+Supportedsince Aug 10, 2021
Current: 157Safari iOS
1–14.5Not supported
15+Supportedsince Sep 20, 2021
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: cause.
Feature detection
JS · check before using
if ("cause" in Error || ("prototype" in Error && "cause" in Error.prototype)) {
// Error.cause is available
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (2). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Error.Error.options_cause_parameter | 93 | 93 | 91 | 15 | 93 | 91 | 15 |
| Error.cause | 93 | 93 | 91 | 15 | 93 | 91 | 15 |