diff --git a/Adyen.EcommLibrary/HttpClient/HttpURLConnectionClient.cs b/Adyen.EcommLibrary/HttpClient/HttpURLConnectionClient.cs index 915d08f2f..24a1687f0 100644 --- a/Adyen.EcommLibrary/HttpClient/HttpURLConnectionClient.cs +++ b/Adyen.EcommLibrary/HttpClient/HttpURLConnectionClient.cs @@ -43,9 +43,7 @@ public string Request(string endpoint, string json, Config config, bool isApiKey catch (WebException e) { var response = (HttpWebResponse)e.Response; - var httpClientException = new HttpClientException((int)response.StatusCode, "HTTP Exception", - response.Headers, response.StatusDescription); - throw httpClientException; + throw new HttpClientException((int)response.StatusCode, "HTTP Exception", response.Headers, response.StatusDescription); } return responseText; }