msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

[Client bug]: Get Request Headers in case of Timeout

Open petrp314 opened this issue 5 years ago • 1 comments

Describe the bug When a Graph API call is finished with Timeout, we are not able to get original Request Headers of the call. Those are needed in case of troubleshooting with MS support.

To Reproduce Steps to reproduce the behavior:

  1. We have custom console app with multiple Graph API calls
  2. When the call finishes with timeout, we are not able to get original headers like “client-request-id” and “x-ms-ags-diagnostic”

Expected behavior We have a support case opened with MS and we need to identify the requests after timeout by the original request headers.

AB#10600

petrp314 avatar Aug 10 '21 11:08 petrp314

Hey @plodik,

Thanks for opening this issue. Ideally, since there is a timeout, the response hasn't really come back so you can't really get the response headers.

However, you should be able to log the headers being sent out from the original request before it goes out by adding a logging handler.

You can find information on how to do that in the doc below.

https://github.com/microsoftgraph/msgraph-sdk-dotnet-core/blob/dev/docs/logging-requests.md

andrueastman avatar Aug 19 '21 07:08 andrueastman