Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The SuppressedError object represents an error generated while handing another error. It is generated during resource disposal using using or await using.
Compared to AggregateError, SuppressedError represents an error that happened during the handling of another error, while AggregateError represents a list of unrelated errors. It is possible, though, for a SuppressedError to contain a chain of suppressed errors (e.suppressed.suppressed.suppressed...). It is also semantically different from cause because the error is not caused by another error, but happens when handling another error.
SuppressedError is a subclass of Error.
Creates a new SuppressedError object.
Also inherits instance properties from its parent Error.
These properties are defined on SuppressedError.prototype and shared by all SuppressedError instances.
SuppressedError.prototype.constructorThe constructor function that created the instance object. For SuppressedError instances, the initial value is the SuppressedError constructor.
SuppressedError.prototype.nameRepresents the name for the type of error. For SuppressedError.prototype.name, the initial value is "SuppressedError".
Note: SuppressedError never has the cause property, because the semantics of cause overlaps with suppressed.
These properties are own properties of each SuppressedError instance.
errorA reference to the error that results in the suppression.
suppressedA reference to the error that is suppressed by error.
Inherits instance methods from its parent Error.
A SuppressedError is thrown when an error occurs during resource disposal. Throwing an error causes scope cleanup, and each disposer during the cleanup can throw its own error. All these errors are collected into a chain of SuppressedError instances, with the original error as the suppressed property and the new error thrown by the next disposer as the error property.
The chain looks like this:
SuppressedError --suppressed--> SuppressedError --suppressed--> Original error | | error error v v Error while disposing resource1 Error while disposing resource2 (Disposal happens later) (Disposal happens earlier)| ECMAScript Async Explicit Resource Management # sec-suppressederror-objects |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jan 21, 2026 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.