mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 02:11:10 +00:00
Adds global exception handling middleware to the API
This commit is contained in:
1 parent
9ea69e6ffc
commit
c2e00242cc
4 files changed
+270
-1
No files matched your search
@@ -10,6 +10,7 @@ using Lumina.Infrastructure.Common.DependencyInjection;
|
||||
using Lumina.Infrastructure.Core.MediaLibrary.Management.Scanning.Progress;
|
||||
using Lumina.Presentation.Api.Common.DependencyInjection;
|
||||
using Lumina.Presentation.Api.Common.Middlewares;
|
||||
using Lumina.Presentation.Api.Common.Utilities;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Data.Sqlite;
|
||||
@@ -107,7 +108,7 @@ public class Program
|
||||
app.UseRouting();
|
||||
app.UseCors("SecurePolicy");
|
||||
|
||||
//app.UseExceptionHandler("/error"); // uses a middleware which re-executes the request to the error path
|
||||
app.UseApiExceptionHandling(); // catches any unhandled exception and returns a ProblemDetails response
|
||||
|
||||
//app.UseHttpsRedirection();
|
||||
|
||||
|
||||
Reference in new issue
Block a user