Skip to content

Commit

Permalink
Ensure ProblemDetails service is registered (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcominerva authored Sep 26, 2024
2 parents b2d0f66 + 48c8818 commit e8b6f7e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public static IServiceCollection AddDefaultProblemDetails(this IServiceCollectio
#if NET8_0_OR_GREATER
public static IServiceCollection AddDefaultExceptionHandler(this IServiceCollection services)
{
// Ensures that the ProblemDetails service is registered.
services.AddProblemDetails();

services.AddExceptionHandler<DefaultExceptionHandler>();
return services;
}
Expand Down

0 comments on commit e8b6f7e

Please sign in to comment.