Table of Contents

Class Error.Gone

Namespace
Trellis
Assembly
Trellis.Core.dll

The resource was previously known but has been permanently removed (tombstone).

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

Constructors

Gone(ResourceRef)

The resource was previously known but has been permanently removed (tombstone).

public Gone(ResourceRef Resource)

Parameters

Resource ResourceRef

The resource that has been removed.

Properties

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

Resource

The resource that has been removed.

public ResourceRef Resource { get; init; }

Property Value

ResourceRef

Methods

For(string?, ResourceRef, string?)

Convenience factory that builds a Error.Gone from an explicit resource reference.

public static Error.Gone For(string? code, ResourceRef resource, string? detail = null)

Parameters

code string

Optional stable reason code naming why the resource is gone. Omitted, empty, or whitespace leaves the inherited Unspecified sentinel.

resource ResourceRef

The removed resource.

detail string

Optional human-readable detail.

Returns

Error.Gone

A Error.Gone wrapping the resource reference.

For(ResourceRef, string?)

Creates a gone error without a finer reason code.

public static Error.Gone For(ResourceRef resource, string? detail = null)

Parameters

resource ResourceRef

The removed resource.

detail string

Optional human-readable detail.

Returns

Error.Gone

A Error.Gone with the unspecified code.

For<TResource>(string?, object?, string?)

Convenience factory that builds a Error.Gone for the resource type TResource (its CLR name becomes the resource name).

public static Error.Gone For<TResource>(string? code = null, object? id = null, string? detail = null)

Parameters

code string

Optional stable reason code naming why the resource is gone — e.g. "order.purged" versus "order.superseded". Omitted, empty, or whitespace leaves the inherited Unspecified sentinel, so an empty string never reaches the wire.

id object

Optional identifier of the specific instance.

detail string

Optional human-readable detail.

Returns

Error.Gone

A Error.Gone wrapping the resource reference.

Type Parameters

TResource

The resource type whose name identifies the resource.