Table of Contents

Class Error.Aggregate

Namespace
Trellis
Assembly
Trellis.Core.dll

Composition of multiple independent errors. Used when several failures occur together (e.g. parallel operations, batch validation). Nested Error.Aggregate values are flattened at construction. The constructor accepts at least one error. Boundary layers decide how to render the collection on their own wire.

public sealed record Error.Aggregate : Error, IEquatable<Error>, IEquatable<Error.Aggregate>
Inheritance
Error.Aggregate
Implements
Inherited Members
Extension Methods

Constructors

Aggregate(IEnumerable<Error>)

Initializes a new aggregate from the supplied errors.

public Aggregate(IEnumerable<Error> errors)

Parameters

errors IEnumerable<Error>

The errors to compose.

Aggregate(EquatableArray<Error>)

Initializes a new aggregate from the supplied errors. Nested aggregates are flattened.

public Aggregate(EquatableArray<Error> errors)

Parameters

errors EquatableArray<Error>

The errors to compose. Must be non-empty.

Aggregate(params Error[])

Initializes a new aggregate from the supplied errors.

public Aggregate(params Error[] errors)

Parameters

errors Error[]

The errors to compose.

Properties

Errors

Gets the flattened list of errors composing this aggregate.

public EquatableArray<Error> Errors { get; }

Property Value

EquatableArray<Error>

Kind

Gets the stable domain slug for this case (e.g. "not-found", "invalid-input"). Suitable for telemetry, observability dimensions, and as the durable identifier that boundary layers translate into transport-specific type identifiers.

public override string Kind { get; }

Property Value

string