Add dependency injection for global exception handler
Introduce methods in DependencyInjection.cs for configuring and using a global exception handler. Update the project file to include a reference to Microsoft.Extensions.Options. Modify GlobalExceptionHandlerMiddleware to accept IOptions<GlobalExceptionHandlerOptions> for enhanced configuration through dependency injection.
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DigitalData.Core.Exceptions\DigitalData.Core.Exceptions.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user