Class HttpError.PreconditionFailed
- Namespace
- Trellis
- Assembly
- Trellis.Http.Abstractions.dll
HTTP 412 — a request precondition (for example If-Match) failed.
public sealed record HttpError.PreconditionFailed : HttpError, ICodedTransportFault, ITransportFault, IEquatable<HttpError>, IEquatable<HttpError.PreconditionFailed>
- Inheritance
-
HttpError.PreconditionFailed
- Implements
- Inherited Members
- Extension Methods
Constructors
PreconditionFailed(ResourceRef, PreconditionKind)
HTTP 412 — a request precondition (for example If-Match) failed.
public PreconditionFailed(ResourceRef Resource, PreconditionKind Condition)
Parameters
ResourceResourceRefThe resource the precondition was evaluated against.
ConditionPreconditionKindWhich precondition failed.
Properties
Code
Gets the machine-readable code for this fault. Defaults to Kind; cases whose payload identifies a specific conditional header override it.
public override string Code { get; }
Property Value
Condition
Which precondition failed.
public PreconditionKind Condition { get; init; }
Property Value
Kind
Gets the stable, HTTP-aligned identifier for this case (for example
"method-not-allowed" or "precondition-failed").
public override string Kind { get; }
Property Value
Resource
The resource the precondition was evaluated against.
public ResourceRef Resource { get; init; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.