EasyException.AspNetCore
0.1.0
dotnet add package EasyException.AspNetCore --version 0.1.0
NuGet\Install-Package EasyException.AspNetCore -Version 0.1.0
<PackageReference Include="EasyException.AspNetCore" Version="0.1.0" />
<PackageVersion Include="EasyException.AspNetCore" Version="0.1.0" />
<PackageReference Include="EasyException.AspNetCore" />
paket add EasyException.AspNetCore --version 0.1.0
#r "nuget: EasyException.AspNetCore, 0.1.0"
#:package EasyException.AspNetCore@0.1.0
#addin nuget:?package=EasyException.AspNetCore&version=0.1.0
#tool nuget:?package=EasyException.AspNetCore&version=0.1.0
EasyException (WIP)
EasyException is a set of NuGet packages that capture unhandled exceptions in ASP.NET Core and analyze the exception asynchronously with a local LLM (Ollama).
Design goals:
- Do not block the request while the LLM runs (analysis happens in a background queue).
- Keep the original exception; analysis is attached via
Exception.Data["EasyException.Analysis"]when possible.
Packages (in this repo)
EasyException.Core: core types (ExceptionReport, breadcrumbs, analyzer contracts)EasyException.Analyzers.Ollama:IExceptionAnalyzerimplementation for OllamaEasyException.AspNetCore: middleware + DI + background analysis queue
ASP.NET Core usage
1) Register services
using EasyException.AspNetCore;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddEasyException(
configure: options =>
{
options.BreadcrumbCapacity = 200;
options.MaxQueueSize = 256;
options.AnalysisTimeout = TimeSpan.FromSeconds(10);
},
configureOllama: ollama =>
{
ollama.BaseUrl = new Uri("http://localhost:11434/");
ollama.Model = "llama3.2";
ollama.Timeout = TimeSpan.FromSeconds(10);
});
var app = builder.Build();
2) Add middleware
app.UseEasyException();
When an unhandled exception happens, the middleware will enqueue it for analysis and attach:
Exception.Data["EasyException.Id"]Exception.Data["EasyException.Fingerprint"]Exception.Data["EasyException.AnalysisStatus"](queued/completed/failed)Exception.Data["EasyException.Analysis"](human-readable analysis, when completed)
Sample WebAPI (for testing)
This repo includes a runnable WebAPI sample:
samples/EasyException.SampleWebApi
Run it:
dotnet run --project .\samples\EasyException.SampleWebApi\EasyException.SampleWebApi.csproj --urls http://localhost:5055
Trigger an exception:
Invoke-RestMethod http://localhost:5055/boom -Method Get -SkipHttpErrorCheck
You should see EasyException analysis completed... in the server logs.
Setting up Ollama locally (Windows)
Install
Option A (Winget):
winget install Ollama.Ollama
Option B: download from https://ollama.com/download
Start Ollama
Ollama typically runs a local server on http://localhost:11434/.
If it’s not already running, start it:
ollama serve
Pull a model
ollama pull llama3.2
(You can use any Ollama model name you have installed.)
Quick health check
Invoke-RestMethod http://localhost:11434/api/tags
If that returns JSON, the server is up.
Notes / caveats
- Breadcrumbs are what make “steps before the exception” possible. Without them, an LLM can only infer from stack traces/logs and may be wrong.
- This project is intentionally minimal; add redaction, throttling/deduping, and storage if you plan to ship it broadly.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- EasyException.Analyzers.Ollama (>= 0.1.0)
- EasyException.Core (>= 0.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 123 | 3/12/2026 |