Class UnableToResolveReadModelFromCommandContext

Namespace
Cratis.Arc.Queries
Assembly
Cratis.Arc.Core.dll

Exception that gets thrown when not being able to resolve a read model from command context.

public class UnableToResolveReadModelFromCommandContext : Exception, ISerializable, IValidationFailure
Inheritance
UnableToResolveReadModelFromCommandContext
Implements
Inherited Members
Extension Methods

Remarks

A read model is keyed by the command's resolved key, so a command that carries no usable identifier can never resolve one — that is invalid client input, not a server fault. This implements IValidationFailure so the command pipeline surfaces it as a validation failure (HTTP 400). The detailed message (naming the read model type) is for server logs only; the client sees the generic validation message.

Constructors

UnableToResolveReadModelFromCommandContext(Type)

Exception that gets thrown when not being able to resolve a read model from command context.

public UnableToResolveReadModelFromCommandContext(Type readModelType)

Parameters

readModelType Type

Type of read model that could not be resolved.

Remarks

A read model is keyed by the command's resolved key, so a command that carries no usable identifier can never resolve one — that is invalid client input, not a server fault. This implements IValidationFailure so the command pipeline surfaces it as a validation failure (HTTP 400). The detailed message (naming the read model type) is for server logs only; the client sees the generic validation message.

Properties

ReadModelType

Gets the read model type that could not be resolved.

public Type ReadModelType { get; }

Property Value

Type

ValidationResult

Gets the ValidationResult describing why the command is invalid.

public ValidationResult ValidationResult { get; }

Property Value

ValidationResult

Remarks

Carries DependencyUnavailable: this is raised before any rule runs, so nothing about the command's own rules has been decided.