![]() |
VOOZH | about |
dotnet add package BitzArt.ApiExceptions.OpenTelemetry --version 1.23.0
NuGet\Install-Package BitzArt.ApiExceptions.OpenTelemetry -Version 1.23.0
<PackageReference Include="BitzArt.ApiExceptions.OpenTelemetry" Version="1.23.0" />
<PackageVersion Include="BitzArt.ApiExceptions.OpenTelemetry" Version="1.23.0" />Directory.Packages.props
<PackageReference Include="BitzArt.ApiExceptions.OpenTelemetry" />Project file
paket add BitzArt.ApiExceptions.OpenTelemetry --version 1.23.0
#r "nuget: BitzArt.ApiExceptions.OpenTelemetry, 1.23.0"
#:package BitzArt.ApiExceptions.OpenTelemetry@1.23.0
#addin nuget:?package=BitzArt.ApiExceptions.OpenTelemetry&version=1.23.0Install as a Cake Addin
#tool nuget:?package=BitzArt.ApiExceptions.OpenTelemetry&version=1.23.0Install as a Cake Tool
This library defines ApiExceptions that you can throw in your .Net applications.
💡 You can always refer to this sample project for guidance.
Add the nuget package:
dotnet add package BitzArt.ApiExceptions.AspNetCore
Add this line to your Program.cs when configuring services:
builder.Services.AddApiExceptionHandler();
Add this line to your Program.cs when configuring the request pipeline:
// This line should go before any other middleware that might throw exceptions
app.UseApiExceptionHandler();
Then, anywhere in your code, you can throw exceptions like:
throw ApiException.BadRequest("your error message");
This will stop any further execution and generate an http response with an appropriate http status code.
The package handles both ApiExceptions as well as regular Exceptions. If the exception is of type ApiException, it will generate a response with the appropriate status code and message. If the exception is of type Exception, the status code will be 500.
💡 These responses are aligned with RFC7807: Problem Details for HTTP APIs.
To use ApiExceptions in your applications, add this nuget package to your project:
dotnet add package BitzArt.ApiExceptions
This will allow you to create and throw ApiExceptions, and you can then handle them as you see fit.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on BitzArt.ApiExceptions.OpenTelemetry:
| Package | Downloads |
|---|---|
|
BitzArt.OpenTelemetry.BoilerPlate
Some boilerplate code for OpenTelemetry |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.23.0 | 346 | 8/27/2025 |
| 1.22.0 | 5,883 | 4/2/2024 |
| 1.21.2 | 233 | 4/2/2024 |
| 1.21.1 | 1,582 | 3/18/2024 |
| 1.21.0 | 261 | 3/18/2024 |
| 1.20.0 | 377 | 2/27/2024 |
| 1.19.0 | 593 | 1/30/2024 |
| 1.18.2 | 349 | 9/5/2023 |
| 1.18.1 | 242 | 9/5/2023 |
| 1.18.0 | 234 | 9/5/2023 |
| 1.17.1 | 238 | 8/18/2023 |
| 1.17.0 | 252 | 8/18/2023 |
| 1.16.0 | 261 | 8/14/2023 |
| 1.15.0 | 251 | 8/14/2023 |
| 1.14.1 | 277 | 8/10/2023 |
| 1.14.0 | 270 | 8/10/2023 |
| 1.13.0 | 251 | 8/10/2023 |