public static Exception CreateFailedException(HttpClient restClient, HttpRequestMessage requestMessage, HttpRequestException ex) { return(RestClientException.Create(HttpStatusCode.InternalServerError, ex.Message, requestMessage.ToRestClientRequest(restClient.BaseAddress), new Response(string.Empty, 0))); }
public static RestClientException CreateFailedException(RSharp.RestClient restClient, RSharp.IRestResponse restResponse) => RestClientException.Create(restResponse.StatusCode, restResponse.StatusDescription, restResponse.Request.ToRestClientRequest(restClient.BaseUrl), restResponse.ToRestClientRequest());
public static RestClientException CreateFailedException(HttpClient restClient, Request request, Response response, HttpResponseMessage httpResponse) => RestClientException.Create(httpResponse.StatusCode, httpResponse.ReasonPhrase, request, response);