Class Error.Conflict
- Namespace
- Trellis
- Assembly
- Trellis.Core.dll
HTTP 409 — the request conflicts with the current state of the resource.
public sealed record Error.Conflict : Error, IEquatable<Error>, IEquatable<Error.Conflict>
- Inheritance
-
Error.Conflict
- Implements
- Inherited Members
- Extension Methods
Constructors
Conflict(ResourceRef?, string)
HTTP 409 — the request conflicts with the current state of the resource.
public Conflict(ResourceRef? Resource, string ReasonCode)
Parameters
ResourceResourceRef?The conflicting resource, when one is identifiable. May be null for stateless conflicts (e.g. workflow / state-machine guards, library code with no aggregate context). RFC 9110 § 15.5.10 implies the target resource via the request URI; the response body is not required to identify it.
ReasonCodestringMachine-readable code describing the kind of conflict (e.g.
"duplicate_key","invalid_state").
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
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
ReasonCode
Machine-readable code describing the kind of conflict (e.g. "duplicate_key", "invalid_state").
public string ReasonCode { get; init; }
Property Value
Resource
The conflicting resource, when one is identifiable. May be null for stateless conflicts (e.g. workflow / state-machine guards, library code with no aggregate context). RFC 9110 § 15.5.10 implies the target resource via the request URI; the response body is not required to identify it.
public ResourceRef? Resource { get; init; }