DeveloperExceptionMiddleware shouldn't have dependencies to `ProblemDetails`
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
In https://github.com/dotnet/aspnetcore/issues/42212 was introduced the `IProblemDetailsService` and the `DeveloperExceptionPageMiddleware` updated to include `ProblemDetails` payload generation.
However, it introduced an unnecessary dependency to `JsonOptions` and `ProblemDetails` that could have been avoided if the the `ProblemDetails` generation was implemented using an `IDeveloperPageExceptionFilter`.
### Expected Behavior
`DeveloperExceptionPageMiddleware` should not have dependencies to `JsonOptions` or `ProblemDetails` but should have the `ProblemDetails` payload generated when `AddProblemDetails` is called.
### .NET Version
.NET 7
Contributor guide
Assessment
This issue has not been assessed yet.