Refactor exception handling middleware

Updated DependencyInjection to use GlobalExceptionHandler.
Removed ExceptionHandlingMiddleware and added
GlobalExceptionHandlerMiddleware for unified exception
handling across the application.
This commit is contained in:
Developer 02
2025-05-16 15:59:38 +02:00
parent f93b197d45
commit 50c19fea31
2 changed files with 6 additions and 6 deletions

View File

@@ -4,9 +4,9 @@ namespace DigitalData.Core.Exceptions;
public static class DependencyInjection
{
public static IApplicationBuilder UseExceptionHandlingMiddleware(this IApplicationBuilder app)
public static IApplicationBuilder UseGlobalExceptionHandler(this IApplicationBuilder app)
{
app.UseMiddleware<ExceptionHandlingMiddleware>();
app.UseMiddleware<GlobalExceptionHandlerMiddleware>();
return app;
}
}