Skip to content

Commit

Permalink
Log BadRequest in adapter (#6135)
Browse files Browse the repository at this point in the history
* Log BadRequest in adapter

* Update libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.Core/BotFrameworkHttpAdapter.cs

Co-authored-by: Gabo Gilabert <gabog@users.noreply.github.com>

* Update libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.Core/CloudAdapter.cs

Co-authored-by: Gabo Gilabert <gabog@users.noreply.github.com>
  • Loading branch information
EricDahlvang and gabog authored Jan 19, 2022
1 parent fee3db6 commit 47e9a29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public async Task ProcessAsync(HttpRequest httpRequest, HttpResponse httpRespons
if (string.IsNullOrEmpty(activity?.Type))
{
httpResponse.StatusCode = (int)HttpStatusCode.BadRequest;
Logger.LogWarning("BadRequest: Missing activity or activity type.");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public async Task ProcessAsync(HttpRequest httpRequest, HttpResponse httpRespons
if (string.IsNullOrEmpty(activity?.Type))
{
httpResponse.StatusCode = (int)HttpStatusCode.BadRequest;
Logger.LogWarning("BadRequest: Missing activity or activity type.");
return;
}

Expand Down

0 comments on commit 47e9a29

Please sign in to comment.