Kck.Exceptions.Abstractions 3.4.0

dotnet add package Kck.Exceptions.Abstractions --version 3.4.0
                    
NuGet\Install-Package Kck.Exceptions.Abstractions -Version 3.4.0
                    
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="Kck.Exceptions.Abstractions" Version="3.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kck.Exceptions.Abstractions" Version="3.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Kck.Exceptions.Abstractions" />
                    
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 Kck.Exceptions.Abstractions --version 3.4.0
                    
#r "nuget: Kck.Exceptions.Abstractions, 3.4.0"
                    
#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 Kck.Exceptions.Abstractions@3.4.0
                    
#: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=Kck.Exceptions.Abstractions&version=3.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Kck.Exceptions.Abstractions&version=3.4.0
                    
Install as a Cake Tool

Kck.Exceptions.Abstractions

Structured HTTP-aware exception hierarchy — CustomException base with concrete types that map automatically to HTTP status codes via [HttpStatusCode] attribute.

Installation

dotnet add package Kck.Exceptions.Abstractions

Quick Start

// Throw typed exceptions in domain/application layer
public async Task<Order> GetOrderAsync(Guid id, CancellationToken ct)
{
    var order = await _repo.GetByIdAsync(id, ct)
        ?? throw new NotFoundException($"Order {id} was not found.");
    return order;
}

public async Task UpdateOrderAsync(UpdateOrderCommand cmd, CancellationToken ct)
{
    if (cmd.Total <= 0)
        throw new BadRequestException("Order total must be greater than zero.");

    if (!await _auth.HasPermissionAsync(cmd.UserId, "orders.write", ct))
        throw new UnauthorizedException("You do not have permission to update orders.");
}

// The exception middleware (Kck.Exceptions.AspNetCore) catches these
// and returns the correct HTTP status code automatically.

Configuration

This is a contracts-only package — no configuration required. Pair with Kck.Exceptions.AspNetCore for automatic HTTP mapping in ASP.NET Core.

Resources

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Kck.Exceptions.Abstractions:

Package Downloads
Kck.Exceptions.AspNetCore

ASP.NET Core global exception handler for Kck exceptions. Maps Kck exception types to RFC 7807 ProblemDetails responses with correct HTTP status codes via [HttpStatusCodeAttribute]. Registered via AddKckExceptionHandling().

Kck.Pipeline.MediatR

MediatR-backed pipeline behaviors for Kck. Provides Authorization, Caching, Logging, Transaction, and Validation behaviors. DEPRECATED — use Kck.Pipeline.Mediator instead. Will be removed in a future version (KCK0200).

Kck.Pipeline.Mediator

Mediator.Abstractions 3.x-backed pipeline behaviors for Kck. Provides Authorization, Caching, Logging, Transaction, and Validation cross-cutting behaviors. The recommended pipeline provider since Kck v2. Registered via AddKckMediator().

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.4.0 142 5/17/2026
3.3.0 139 5/17/2026
3.2.0 143 5/17/2026
3.1.0 142 5/17/2026
3.0.0 145 5/17/2026
2.0.0 145 5/7/2026