Serializable errors
Limited availability
The DOMException
, Error
, EvalError
, RangeError
, ReferenceError
, SyntaxError
, TypeError
, and URIError
objects are serializable. You can call structuredClone()
on an error object or pass it to a worker using postMessage()
.
Compatibility
- Chrome 77 Released on 2019-09-10
- Chrome Android 77 Released on 2019-09-10
- Edge 79 Released on 2020-01-15
- Firefox 103 Released on 2022-07-26
- Firefox for Android 103 Released on 2022-07-26
- Safari ❌ Search for bugs Search for standards position
- Safari on iOS ❌ Search for bugs Search for standards position
MDN docs
Specifications
- Web IDL Standard, from Web IDL Workstream (WHATWG).
BCD data
- api.DOMException.serializable_object
- javascript.builtins.Error.serializable_object
- javascript.builtins.EvalError.serializable_object
- javascript.builtins.RangeError.serializable_object
- javascript.builtins.ReferenceError.serializable_object
- javascript.builtins.SyntaxError.serializable_object
- javascript.builtins.TypeError.serializable_object
- javascript.builtins.URIError.serializable_object