diff --git a/src/TinyHelpers.AspNetCore/Extensions/ServiceCollectionExtensions.cs b/src/TinyHelpers.AspNetCore/Extensions/ServiceCollectionExtensions.cs index 784e532..cf26c00 100644 --- a/src/TinyHelpers.AspNetCore/Extensions/ServiceCollectionExtensions.cs +++ b/src/TinyHelpers.AspNetCore/Extensions/ServiceCollectionExtensions.cs @@ -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(); return services; }