microsoftgraph/msgraph-beta-sdk-dotnet

Graph SDK V5: Default RetryHandler does not provide info on why it failed

DCourtel opened this issue · 1 comments

The default retry handler simply throws an InvalidOperationException exception when it reaches the maximum retry count. The error message is simply set to: «Too many retries performed.» and the inner exception simply states: «More than {retryCount} retries encountered while sending the request.»
There is no way to know why retries have been performed. What were the error codes and error messages?

The retry handler should return an AggregateException (or a specific exception like TooManyRetriesException) with one exception per retry specifying the HTTP status and the error code returned by the server.

Thanks.

Source: Microsoft.Kiota.Http.HttpClientLibrary.Middleware.RetryHandler

Thanks for raising this @DCourtel

I believe this is a valid ask. As this is related to the http library, we'll close this here and track this from the library via microsoft/kiota-http-dotnet#221