ErrorSerialization
Options controlling how errors are converted into SerializedError.
Properties
Section titled “Properties”aggregated?
Section titled “aggregated?”
optionalaggregated:boolean
Include AggregateError.errors array serialization.
cause?
Section titled “cause?”
optionalcause:boolean
Include the error.cause property in serialization.
hook()?
Section titled “hook()?”
optionalhook: (err,depth) =>SerializedError
Hook invoked after serializing each error node. Allows post-processing or filtering of the SerializedError.
Parameters
Section titled “Parameters”The freshly built SerializedError.
number
Current recursion depth (0 = root).
Returns
Section titled “Returns”Possibly modified SerializedError.
maxDepth?
Section titled “maxDepth?”
optionalmaxDepth:number
Maximum recursion depth when traversing nested causes or aggregates.
stack?
Section titled “stack?”
optionalstack:boolean
Include the error.stack string in the output.