feat(ExceptionHandlingMiddleware): Hinzufügen, um Ausnahmen global zu behandeln

This commit is contained in:
2025-08-21 10:57:34 +02:00
parent 55c0f44954
commit 730a318b56
3 changed files with 88 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ using EnvelopeGenerator.Web.Sanitizers;
using EnvelopeGenerator.Application.Contracts.Services;
using EnvelopeGenerator.Web.Models.Annotation;
using DigitalData.UserManager.DependencyInjection;
using EnvelopeGenerator.Web.Middleware;
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
logger.Info("Logging initialized!");
@@ -199,6 +200,8 @@ try
var app = builder.Build();
app.UseMiddleware<ExceptionHandlingMiddleware>();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{