Raycynix.Extensions.Exceptions 3.0.0

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

Raycynix.Extensions.Exceptions

Raycynix.Extensions.Exceptions is the core exception handling package.

What it contains

  • AddRaycynixExceptions(...)
  • exception mapping
  • secure data masking
  • transient exception classification
  • retry execution services
  • background task execution helpers
  • optional Microsoft ILogger<T> diagnostics for retry and background execution
  • common Raycynix exception types

What it does not contain

  • ASP.NET Core middleware
  • IApplicationBuilder extensions
  • HTTP response formatting

Usage

builder.Services.AddRaycynixExceptions(options =>
{
    options.Map<InvalidOperationException>(
        errorCode: "invalid_operation",
        message: "The operation is not valid.",
        statusCode: 400);
});

You can also customize mappings for domain-specific exceptions:

builder.Services.AddRaycynixExceptions(options =>
{
    options.Map<UnauthorizedAccessException>(
        errorCode: "access_denied",
        message: "You do not have permission to perform this action.",
        statusCode: 403);
});

For ASP.NET Core request pipeline integration, add Raycynix.Extensions.Exceptions.AspNetCore.

Logging

The package uses optional Microsoft ILogger<T> diagnostics when logging is registered in the application. No Raycynix logging provider is required.

Diagnostics cover retry attempts, retry exhaustion, background operation cancellation, and background operation failures. The package avoids logging secure detail payloads directly.

Contract Guarantees

  • custom mappings must provide a non-empty error code and public message
  • mapped HTTP status codes must be between 400 and 599
  • configured mappings and validation errors are snapshotted during construction
  • retry execution restores the previous error execution context after completion
  • user-provided mapper, masker, classifier, retry executor, and background runner registrations are preserved

Migrating From 2.x

  • ExceptionMapperOptions.Mappings is now read-only.
  • Invalid mapping delegates, status codes, error codes, and messages fail during setup.
  • ValidationException.ValidationErrors now exposes IReadOnlyDictionary<string, string[]>.
  • Null operation delegates and blank background operation names are rejected.
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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Raycynix.Extensions.Exceptions:

Package Downloads
Raycynix.Extensions.Exceptions.AspNetCore

ASP.NET Core middleware for secure structured Raycynix JSON error responses, validation errors, correlation metadata, and transient retry hints.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 101 8/10/2026
2.2.0 208 6/23/2026
1.0.1 167 4/20/2026 1.0.1 is deprecated because it is no longer maintained.
1.0.0 154 4/8/2026 1.0.0 is deprecated because it is no longer maintained.
0.3.0 155 4/8/2026 0.3.0 is deprecated because it is no longer maintained.

v3.0.0 adds validated and read-only mapper contracts, defensive exception data snapshots, composite-name secret masking, bounded retry backoff, safe override-friendly DI registration, retry context cleanup, and stricter operation argument validation.