Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AggregateException thrown when Service ins Unavailable #2444

Closed
Danny4021 opened this issue Apr 18, 2024 · 1 comment
Closed

AggregateException thrown when Service ins Unavailable #2444

Danny4021 opened this issue Apr 18, 2024 · 1 comment
Labels
type:bug A broken experience

Comments

@Danny4021
Copy link

Danny4021 commented Apr 18, 2024

Describe the bug

Hello,
when I make any kind of request to Graph (i.e. Send E-Mail, Get Delta, Get Folder, etc) I sometimes get an AggregateException from Kiota, when the Service is unavailable.

Expected behavior

I wouldn't expect this to throw a AggregateException since this never happened before and it just started appearing randomly yesterday (haven't updated Graph since 10.04.2024).
I would expect this to be wrapped inside an ApiError .
Is this behaviour normal? Is this fixed in a newer version of the SDK?

How to reproduce

This just happens randomly when sending any kind of request to the Graph API (i.e. send mail, get mail, get folder, etc)
Her is an example request from me:

await graphClient
					.Users[mailAddress]
					.Messages[mailId]
					.GetAsync()

SDK Version

5.47.0

Latest version known to work for scenario above?

<5.47.0

Debug output

System.AggregateException: Too many retries performed. More than 3 retries encountered while sending the request. (HTTP request failed with status code: ServiceUnavailable.�?�
l?Qk?0�??�??]???j???@?��??-n????�N%I????Z??�/?s?????�?S! ??�?r?g1?
--- End of inner exception stack trace ---
   at Microsoft.Kiota.Http.HttpClientLibrary.Middleware.RetryHandler.SendRetryAsync(HttpResponseMessage response, RetryHandlerOption retryOption, CancellationToken cancellationToken, ActivitySource activitySource)
   at Microsoft.Kiota.Http.HttpClientLibrary.Middleware.RetryHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Kiota.Http.HttpClientLibrary.Middleware.CompressionHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.GetHttpResponseMessage(RequestInformation requestInfo, CancellationToken cancellationToken, Activity activityForAttributes, String claims, Boolean isStreamResponse)
   at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendNoContentAsync(RequestInformation requestInfo, Dictionary`2 errorMapping, CancellationToken cancellationToken)
   at Microsoft.Graph.Users.Item.SendMail.SendMailRequestBuilder.PostAsync(SendMailPostRequestBody body, Action`1 requestConfiguration, CancellationToken cancellationToken)
---> (Inner Exception microsoft/kiota-http-dotnet#1) Microsoft.Kiota.Abstractions.ApiException: HTTP request failed with status code: ServiceUnavailable.�?�
l?Qk?0�??�??]???j???@?��??-n????�N%I????Z??�/?s?????�?S! ??�?r?g1?
---> (Inner Exception microsoft/kiota-http-dotnet#2) Microsoft.Kiota.Abstractions.ApiException: HTTP request failed with status code: ServiceUnavailable.�?�
l?Qk?0�??�??]???j???@?��??-n????�N%I????Z??�/?s?????�?S! ??�?r?g1?
---> (Inner Exception microsoft/kiota-http-dotnet#3) Microsoft.Kiota.Abstractions.ApiException: HTTP request failed with status code: ServiceUnavailable.�?�
l?Qk?0�??�??]???j???@?��??-n????�N%I????Z??�/?s?????�?S! ??�?r?g1?
@andrueastman
Copy link
Member

Thanks for raising this @Danny4021

This just happens randomly when sending any kind of request to the Graph API
This will occur in the event of transient errors in the API due to the returning of 429/502/503 response. In the event no transient errors occur in the API, you won't see these.

We'll close this for now and track the consistency in errors via microsoft/kiota-dotnet#273 so that this may be followed up from the library side.

@andrueastman andrueastman removed the status:waiting-for-triage An issue that is yet to be reviewed or assigned label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

2 participants