Table of Contents

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

Resource ResourceRef?

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.

ReasonCode string

Machine-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

string

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

ReasonCode

Machine-readable code describing the kind of conflict (e.g. "duplicate_key", "invalid_state").

public string ReasonCode { get; init; }

Property Value

string

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; }

Property Value

ResourceRef?