diff --git a/dotnet/src/dotnetframework/GxClasses/Domain/GxHttpClient.cs b/dotnet/src/dotnetframework/GxClasses/Domain/GxHttpClient.cs index ca6d812bc..db488e0d6 100644 --- a/dotnet/src/dotnetframework/GxClasses/Domain/GxHttpClient.cs +++ b/dotnet/src/dotnetframework/GxClasses/Domain/GxHttpClient.cs @@ -767,7 +767,7 @@ public void HttpClientExecute(string method, string name) else _errDescription = aex.Message; response = new HttpResponseMessage(); - response.Content = new StringContent(_errDescription); + response.Content = new StringContent(HttpHelper.StatusCodeToTitle(HttpStatusCode.InternalServerError)); response.StatusCode = HttpStatusCode.InternalServerError; } #endif @@ -780,7 +780,7 @@ public void HttpClientExecute(string method, string name) else _errDescription = e.Message; response = new HttpResponseMessage(); - response.Content = new StringContent(_errDescription); + response.Content = new StringContent(HttpHelper.StatusCodeToTitle(HttpStatusCode.InternalServerError)); #if NETCORE response.StatusCode = (HttpStatusCode)(e.StatusCode != null ? e.StatusCode : HttpStatusCode.InternalServerError); #else @@ -794,7 +794,7 @@ public void HttpClientExecute(string method, string name) _errDescription = "The request has timed out. " + e.Message; response = new HttpResponseMessage(); response.StatusCode = 0; - response.Content = new StringContent(""); + response.Content = new StringContent(String.Empty); } catch (Exception e) { @@ -805,7 +805,7 @@ public void HttpClientExecute(string method, string name) else _errDescription = e.Message; response = new HttpResponseMessage(); - response.Content = new StringContent(_errDescription); + response.Content = new StringContent(HttpHelper.StatusCodeToTitle(HttpStatusCode.InternalServerError)); response.StatusCode = HttpStatusCode.InternalServerError; } GXLogging.Debug(log, "Reading response...");