Skip to content

SerializedError

Plain-object representation of an Error or thrown value. Includes structured details, avoiding circular references.

[key: string]: unknown

Any additional enumerable properties from the original Error. Allows capturing custom fields.

optional cause: unknown

Serialized cause of this error (if cause option enabled). May be another SerializedError or any raw value.


optional errors: SerializedError[]

For AggregateError: array of child errors (if aggregated option enabled).


message: string

The main error message.


optional stack: string

Optional stack trace string (if stack option enabled).


type: string

The error’s constructor name or type.