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). On the wire this typically renders as a problem-details extensions.errors array; 207 Multi-Status is reserved for explicit batch endpoints.

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

Remarks

Nested Error.Aggregate values are flattened at construction. The constructor accepts at least one error.

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, IANA-aligned identifier for this case (e.g. "not-found", "unprocessable-content"). Suitable for telemetry, problem-details type URI synthesis, and wire serialization.

public override string Kind { get; }

Property Value

string