Raycynix.Extensions.Exceptions.AspNetCore
3.0.0
dotnet add package Raycynix.Extensions.Exceptions.AspNetCore --version 3.0.0
NuGet\Install-Package Raycynix.Extensions.Exceptions.AspNetCore -Version 3.0.0
<PackageReference Include="Raycynix.Extensions.Exceptions.AspNetCore" Version="3.0.0" />
<PackageVersion Include="Raycynix.Extensions.Exceptions.AspNetCore" Version="3.0.0" />
<PackageReference Include="Raycynix.Extensions.Exceptions.AspNetCore" />
paket add Raycynix.Extensions.Exceptions.AspNetCore --version 3.0.0
#r "nuget: Raycynix.Extensions.Exceptions.AspNetCore, 3.0.0"
#:package Raycynix.Extensions.Exceptions.AspNetCore@3.0.0
#addin nuget:?package=Raycynix.Extensions.Exceptions.AspNetCore&version=3.0.0
#tool nuget:?package=Raycynix.Extensions.Exceptions.AspNetCore&version=3.0.0
Raycynix.Extensions.Exceptions.AspNetCore
Raycynix.Extensions.Exceptions.AspNetCore adds ASP.NET Core middleware integration for Raycynix exceptions.
What it contains
UseRaycynixExceptions(this IApplicationBuilder app)RaycynixExceptionMiddleware- optional Microsoft
ILogger<T>diagnostics for handled request failures
Usage
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRaycynixExceptions();
var app = builder.Build();
app.UseRaycynixExceptions();
app.Run();
Mapped exceptions are written as structured JSON responses. For example, a mapped validation exception produces an HTTP response body shaped by the core exception package and the ASP.NET Core middleware.
This package depends on Raycynix.Extensions.Exceptions for the core exception mapping and retry services.
Public responses contain trace and correlation identifiers, request path and method, error details, validation errors, and retry hints when applicable. Raw query strings, user identifiers, secure details, and internal execution context are never included.
IOperationContext is optional. Register it when correlation metadata should be added to responses and logs.
Logging
The middleware uses optional Microsoft ILogger<T> diagnostics when logging is registered in the application. No Raycynix logging provider is required.
Diagnostics include exception category, error code, trace identifiers, method, path, endpoint, whether a query string was present, and masked secure details. Raw query string values are not logged.
Migrating From 2.x
- Public JSON responses no longer contain
queryStringorcontext. - Client-aborted request cancellation is propagated through the ASP.NET Core pipeline.
- Applications no longer need to register
IOperationContextunless correlation metadata is required.
| Product | Versions 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. |
-
net10.0
- Raycynix.Extensions.Exceptions (>= 3.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v3.0.0 hardens exception middleware responses by excluding raw query strings and internal execution context, propagating request cancellation, and making operation context integration optional.