feat:添加异常过滤器
This commit is contained in:
parent
17aa5a8b7f
commit
ec0acc2421
@ -57,6 +57,8 @@ public class InterfaceForwardApiModule : FakeModule
|
|||||||
await next.Invoke();
|
await next.Invoke();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.UseFakeExceptionHandling();
|
||||||
|
|
||||||
// Add Aspire default endpoints.
|
// Add Aspire default endpoints.
|
||||||
app.MapDefaultEndpoints();
|
app.MapDefaultEndpoints();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
|
|||||||
@ -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
Loading…
Reference in New Issue
Block a user