Share via


IProblemDetailsService.WriteAsync(ProblemDetailsContext) Method

Definition

Write a ProblemDetails response to the current context, using the registered IProblemDetailsWriter services.

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

Parameters

context
ProblemDetailsContext

The ProblemDetailsContext associated with the current request/response.

Returns

Exceptions

If no IProblemDetailsWriter can write to the given context.

Remarks

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.

Applies to