Claudalisk.AspNetCore 0.1.0-alpha.3

This is a prerelease version of Claudalisk.AspNetCore.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Claudalisk.AspNetCore --version 0.1.0-alpha.3
                    
NuGet\Install-Package Claudalisk.AspNetCore -Version 0.1.0-alpha.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Claudalisk.AspNetCore" Version="0.1.0-alpha.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Claudalisk.AspNetCore" Version="0.1.0-alpha.3" />
                    
Directory.Packages.props
<PackageReference Include="Claudalisk.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Claudalisk.AspNetCore --version 0.1.0-alpha.3
                    
#r "nuget: Claudalisk.AspNetCore, 0.1.0-alpha.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Claudalisk.AspNetCore@0.1.0-alpha.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Claudalisk.AspNetCore&version=0.1.0-alpha.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Claudalisk.AspNetCore&version=0.1.0-alpha.3&prerelease
                    
Install as a Cake Tool

Claudalisk.AspNetCore

What every Host needs: one Problem Details handler, conditional writes, HAL members, the health endpoint and module tags in the OpenAPI document.

Problem types

AddClaudaliskWeb registers one exception handler. Every error is an application/problem+json body.

Exception Status Type
DomainException 404, 403 or 409 by its kind /problems/{module}/{slug} (/problems/{slug} outside a module)
MessageValidationException 400 none; a validation problem with errors
StaleVersionException 412 /problems/precondition-failed
ConcurrencyConflictException 409 /problems/concurrency-conflict
PreconditionRequiredException 428 /problems/precondition-required
DependencyUnavailableException 503 with Retry-After /problems/dependency-unavailable
BadHttpRequestException its own status none
anything else 500 none

A DomainException problem's title is its slug as words, such as Already shipped for already-shipped, so it stays the same for every occurrence. Its detail is the exception's message.

The handler only writes a body for an exception. A response that already has a problem body, such as Results.ValidationProblem or ValidationProblem(ModelState) from a controller, keeps it, errors included.

Stale writes and lost races

  • A write that carries If-Match loads the aggregate and calls AggregateRoot.RequireVersion with that version. A mismatch throws StaleVersionException and the response is 412. The client reads the resource again. The dispatcher never retries it.
  • A ConcurrencyConflictException that still reaches the Host has lost the race on every attempt (DispatchingOptions.ConcurrencyAttempts). The response is 409. The client may send the same request again.

Retry-After

A DependencyUnavailableException answers with Retry-After in whole seconds, rounded up: the exception's RetryAfter, else ClaudaliskWebOptions.DefaultRetryAfter (30 seconds, must be positive). The health endpoint's 503 uses the same type and header.

Logging

A 503 is logged at Warning with the exception. A 500 is logged at Error. Other statuses are not logged by the handler.

OpenAPI

Every operation lists the 409, 412, 428 and 503 problem responses above as application/problem+json with the ProblemDetails schema, unless the endpoint already declares a response for that status.

If-Match

Request.RequiredIfMatchVersion() reads one strong version tag such as "7". A missing header throws PreconditionRequiredException (428). A malformed one throws a BadHttpRequestException (400) whose message does not repeat the value that was sent.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Claudalisk.AspNetCore:

Package Downloads
Claudalisk.Jobs

Queued work as jobs: queueing in the unit of work, workers with retries, heartbeats, cancel and progress, batch jobs, event fan-out and the jobs router.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha.5 91 11/24/2026
0.1.0-alpha.4 164 11/22/2026
0.1.0-alpha.3 75 11/22/2026
0.1.0-alpha.2 81 11/21/2026
0.1.0-alpha.1 678 11/8/2026