GitIssues.ExceptionHandling
1.0.0
dotnet add package GitIssues.ExceptionHandling --version 1.0.0
NuGet\Install-Package GitIssues.ExceptionHandling -Version 1.0.0
<PackageReference Include="GitIssues.ExceptionHandling" Version="1.0.0" />
<PackageVersion Include="GitIssues.ExceptionHandling" Version="1.0.0" />
<PackageReference Include="GitIssues.ExceptionHandling" />
paket add GitIssues.ExceptionHandling --version 1.0.0
#r "nuget: GitIssues.ExceptionHandling, 1.0.0"
#:package GitIssues.ExceptionHandling@1.0.0
#addin nuget:?package=GitIssues.ExceptionHandling&version=1.0.0
#tool nuget:?package=GitIssues.ExceptionHandling&version=1.0.0
GitIssues.ExceptionHandling
ASP.NET Core integration for GitIssues that automatically reports unhandled exceptions as GitHub Issues.
It plugs a GitHubExceptionHandler into ASP.NET Core's exception-handling middleware, so exceptions that reach it are reported to GitHub without any extra code in your controllers or endpoints.
Install
dotnet add package GitIssues.ExceptionHandling
This package depends on GitIssues, which is installed automatically.
Usage
First, register the core reporter (see the GitIssues README for all configuration options):
using GitHubErrorReporter.DependencyInjection;
builder.Services.AddGitHubErrorReporter(options =>
{
options.Owner = builder.Configuration["GitHubIssues:Owner"]!;
options.Repository = builder.Configuration["GitHubIssues:Repository"]!;
options.Token = builder.Configuration["GitHubIssues:Token"]!;
options.ServiceName = builder.Configuration["GitHubIssues:ServiceName"];
options.Environment = builder.Environment.EnvironmentName;
});
Then register the exception handler:
using GitIssues.ExceptionHandling.Extensions;
builder.Services.AddGitIssuesExceptionHandler();
And enable the exception-handling middleware:
var app = builder.Build();
app.UseExceptionHandler();
app.MapControllers();
app.Run();
Now an unhandled exception, such as:
throw new InvalidOperationException("Something unexpected happened.");
will reach the exception handler and automatically create a GitHub Issue.
Handled vs. unhandled exceptions
This package only sees exceptions that reach the exception-handling middleware.
This exception is unhandled and will be picked up automatically:
throw new InvalidOperationException("Something went wrong.");
This exception is handled and will not be picked up, because it never reaches GitHubExceptionHandler:
try
{
throw new InvalidOperationException("Something went wrong.");
}
catch (Exception ex)
{
return StatusCode(500, ex.Message);
}
For handled exceptions, report them explicitly using the core GitIssues package from inside the catch block.
License
MIT
| 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
- GitIssues (>= 1.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.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 44 | 9/16/2026 |