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
ResourceResourceRefThe 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
Resource
The resource that has been removed.
public ResourceRef Resource { get; init; }
Property Value
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
codestringOptional stable reason code naming why the resource is gone. Omitted, empty, or whitespace leaves the inherited Unspecified sentinel.
resourceResourceRefThe removed resource.
detailstringOptional 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
resourceResourceRefThe removed resource.
detailstringOptional 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
codestringOptional 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.idobjectOptional identifier of the specific instance.
detailstringOptional human-readable detail.
Returns
- Error.Gone
A Error.Gone wrapping the resource reference.
Type Parameters
TResourceThe resource type whose name identifies the resource.