From 921c874fd4e4e4e46dcd55ea52bc944e65bbdbe0 Mon Sep 17 00:00:00 2001 From: Nahuel Perales Date: Mon, 14 Nov 2022 17:09:04 -0300 Subject: [PATCH] obscure exceptions' bodies --- .../BotFrameworkHttpAdapter.cs | 2 +- .../Integration/EndToEndMiniLoadTests.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.WebApi/BotFrameworkHttpAdapter.cs b/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.WebApi/BotFrameworkHttpAdapter.cs index d7eb0011f9..b74057617a 100644 --- a/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.WebApi/BotFrameworkHttpAdapter.cs +++ b/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.WebApi/BotFrameworkHttpAdapter.cs @@ -168,7 +168,7 @@ private async Task ConnectWebSocketAsync(IBot bot, HttpRequestMessage httpReques catch (Exception ex) { httpResponse.StatusCode = HttpStatusCode.InternalServerError; - httpResponse.Content = new StringContent($"Unable to create transport server. Error: {ex}"); + httpResponse.Content = new StringContent($"Unable to create transport server. Error: {ex.Message}"); throw; } } diff --git a/tests/Microsoft.Bot.Connector.Streaming.Tests/Integration/EndToEndMiniLoadTests.cs b/tests/Microsoft.Bot.Connector.Streaming.Tests/Integration/EndToEndMiniLoadTests.cs index 87ec4c9ef0..725607f7e8 100644 --- a/tests/Microsoft.Bot.Connector.Streaming.Tests/Integration/EndToEndMiniLoadTests.cs +++ b/tests/Microsoft.Bot.Connector.Streaming.Tests/Integration/EndToEndMiniLoadTests.cs @@ -265,7 +265,7 @@ public void ActivityWithAttachmentsTest(bool useLegacyClient, bool useLegacyServ } catch (Exception e) { - return Task.FromResult(StreamingResponse.InternalServerError(new StringContent(e.ToString()))); + return Task.FromResult(StreamingResponse.InternalServerError(new StringContent(e.Message))); } }); @@ -372,7 +372,7 @@ public void ConcurrencyTest(int connectionCount, int messageCount, int threadCou } catch (Exception e) { - return Task.FromResult(StreamingResponse.InternalServerError(new StringContent(e.ToString()))); + return Task.FromResult(StreamingResponse.InternalServerError(new StringContent(e.Message))); } });