IProblemDetailsService.WriteAsync(ProblemDetailsContext) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Write a ProblemDetails response to the current context, using the registered IProblemDetailsWriter services.
C#
public System.Threading.Tasks.ValueTask WriteAsync (Microsoft.AspNetCore.Http.ProblemDetailsContext context);
abstract member WriteAsync : Microsoft.AspNetCore.Http.ProblemDetailsContext -> System.Threading.Tasks.ValueTask
Public Function WriteAsync (context As ProblemDetailsContext) As ValueTask
- context
- ProblemDetailsContext
The ProblemDetailsContext associated with the current request/response.
If no IProblemDetailsWriter can write to the given context.
The IProblemDetailsWriter registered services are processed in sequence and the processing is completed when:
- One of them reports that the response was written successfully, or.
- All IProblemDetailsWriter were executed and none of them was able to write the response successfully.
Product | Versions |
---|---|
ASP.NET Core | 7.0, 8.0, 9.0 |