Get the Newsletter

AggregateError

A Function

AggregateError(message: string, innerError?: Error, skipIfAlreadyAggregate?: boolean): Error

Creates an instance of Error that aggregates and preserves an innerError.

Parameters

message: string
The error message.
innerError?: Error
The inner error message to aggregate.
skipIfAlreadyAggregate?: boolean
Indicates to not wrap the inner error if it itself already has an innerError.

Returns

The Error instance.