Table of Contents

Class Error.Unexpected

Namespace
Trellis
Assembly
Trellis.Core.dll

An unhandled internal failure occurred. Code identifies the kind of failure; FaultId optionally correlates to deeper diagnostics.

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

Constructors

Unexpected(string, string?)

An unhandled internal failure occurred. Code identifies the kind of failure; FaultId optionally correlates to deeper diagnostics.

public Unexpected(string Code, string? FaultId = null)

Parameters

Code string

Stable machine-readable code identifying the kind of unexpected condition. Pass a FaultCodes constant rather than a literal — UnhandledException ("unhandled-exception"), DefaultInitialized ("default-initialized"), or NotImplemented ("not-implemented"), which the ASP boundary maps to HTTP 501.

FaultId string

Optional opaque per-incident identifier correlating to richer diagnostics in the logging/telemetry layer.

Properties

FaultId

Optional opaque per-incident identifier correlating to richer diagnostics in the logging/telemetry layer.

public string? FaultId { get; init; }

Property Value

string

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