Table of Contents

Class Error.PreconditionFailed

Namespace
Trellis
Assembly
Trellis.Core.dll

HTTP 412 — a request precondition (e.g. If-Match) failed.

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

Constructors

PreconditionFailed(ResourceRef, PreconditionKind)

HTTP 412 — a request precondition (e.g. If-Match) failed.

public PreconditionFailed(ResourceRef Resource, PreconditionKind Condition)

Parameters

Resource ResourceRef

The resource the precondition was evaluated against.

Condition PreconditionKind

Which precondition failed.

Properties

Code

Gets the per-instance machine-readable code. Defaults to Kind; cases whose payload carries a per-instance ReasonCode override this.

public override string Code { get; }

Property Value

string

Condition

Which precondition failed.

public PreconditionKind Condition { get; init; }

Property Value

PreconditionKind

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

Resource

The resource the precondition was evaluated against.

public ResourceRef Resource { get; init; }

Property Value

ResourceRef