Error constructor property preserving original errors (ES2022). Helps track nested failures.
Solution Code
JavaScript
throw new Error('API failed', { cause: networkError });
Explanation
Maintains error context without custom properties. Access via error.cause.Guided Hints
Stack trace behavior
Browser compatibility