Skip to content

Problem details #29152

@Rick-Anderson

Description

@Rick-Anderson

Add to Problem details

See this comment

Any writer registered before the call to the AddProblemDetails will be evaluated before the DefaultProblemDetailsWrapper

I had to register my custom IProblemDetailsWriter before the call to AddRazorPages AND the call to AddProblemDetails for it to be evaluated before the DefaultProblemDetailsWriter.

@zwoolli If I am not mistaken AddRazorPages probably calls AddMVCCore (need to double check) that register a default writer for API Controllers. I believe your case the problem is not the DefaultProblemDetailsWriter but the DefaultApiProblemDetailsWriter. In both cases you are right and AddProblemDetails must be called before.

@Rick-Anderson maybe we could add something about it in the docs if not there yet.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.


Associated WorkItem - 88397

Metadata

Metadata

Assignees

Labels

Source - Docs.msDocs Customer feedback via GitHub Issuedoc-ideaseQUESTeredIdentifies that an issue has been imported into Quest.

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions