Skip to content

DeveloperExceptionMiddleware shouldn't have dependencies to ProblemDetails #46339

@brunolins16

Description

@brunolins16

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

In #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-problem-details

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions