feat:添加异常过滤器

This commit is contained in:
xiaolipro 2025-07-29 15:52:53 +08:00
parent 17aa5a8b7f
commit ec0acc2421
3 changed files with 16 additions and 1 deletions

View File

@ -57,6 +57,8 @@ public class InterfaceForwardApiModule : FakeModule
await next.Invoke();
});
app.UseFakeExceptionHandling();
// Add Aspire default endpoints.
app.MapDefaultEndpoints();
app.MapControllers();

View File

@ -0,0 +1,12 @@
using Fake.DependencyInjection;
using Fake.ExceptionHandling;
namespace InterfaceForward.Application.Filters;
public class ExceptionNotifier: IExceptionNotifier, ITransientDependency
{
public Task NotifyAsync(ExceptionNotificationContext context)
{
return Task.CompletedTask;
}
}

File diff suppressed because one or more lines are too long