HttpResponseMessageUtility.CreateWebServiceExceptionWithContentPreviewAsync method

Creates an exception for the specified response, reading a content preview from the response.

public static Task<WebServiceException> CreateWebServiceExceptionWithContentPreviewAsync(
    HttpResponseMessage response, string? message = null, Exception? innerException = null)
parameter description
response The response.
message The message.
innerException The inner exception.

Return Value

A new exception.

Remarks

Do not call this method if the response stream has already been retrieved.

See Also