Is there an existing issue for this?
Describe the bug
Cross posting from dotnet/aspnetcore#62186
Reported there, since the code explicitly mentions dotnet/aspnetcore#52577.
tldr: TryAddProblemDetailsRfc7231Compliance
searches for "DefaultProblemDetailsWriter" but always replaces the first "IProblemDetailsWriter" registered with the service provider.
Expected Behavior
I can use a custom IProblemDetailsWriter before the default writer.
Steps To Reproduce
See dotnet/aspnetcore#62186
Exceptions (if any)
None
.NET Version
9.0.203
Anything else?
See dotnet/aspnetcore#62186