Issue
When graph endpoint for adding tabs POST: /tabs gives throttling (429) error. When RetryHandler calls retryRequest it checks for isBuffered where it requires header Transfer-Encoding as Chunked, in order to send True and to set shouldRetry flag as True.
Issue Class : com.microsoft.graph.httpcore.RetryHandler (microsoft-graph SDK version 2.7.1)
Observations
Some times header "Transfer-Encoding = chunked" is missing in the response headers. Causing it to return False. As a result it sets shouldRetry flag as False and it never retry again.
Response Headers :
[
Cache-Control : private,
client-request-id : 5a064a73-9106-40ec-8dff-4069c5752de4,
Content-Length : 885,
Content-Type : application/json,
Date : Fri, 26 Feb 2021 14:03:23 GMT,
request-id : 64638ad8-1f98-49d1-9185-238341d4938e,
Retry-After : 60,
Strict-Transport-Security : max-age=31536000,
x-ms-ags-diagnostic :
{"ServerInfo": {"DataCenter":"SouthIndia","Slice":"SliceC","Ring":"3", "ScaleUnit":"001","RoleInstance":"AGSFE_IN_7" }}
]
Response Body :
{
"error": {
"code": "TooManyRequests",
"message": "Too many requests from Identifier:9155ce04-4eae-42ae-905e-ac219c282f72+786c9214-bb88-448d-9a43-3afeb1518b52+786c9214-bb88-448d-9a43-3afeb1518b52 under category:throttle.teams.ags.api_complex_level_10.tenant_normal.app_normal.operation_write_sustained. Please try again later.",
"innerError": {
"date": "2021-02-26T14:03:23",
"request-id": "64638ad8-1f98-49d1-9185-238341d4938e",
"client-request-id": "5a064a73-9106-40ec-8dff-4069c5752de4",
"status": 429,
"code": "429",
"message": "Too many requests from Identifier:9155ce04-4eae-42ae-905e-ac219c282f72+786c9214-bb88-448d-9a43-3afeb1518b52+786c9214-bb88-448d-9a43-3afeb1518b52 under category:throttle.teams.ags.api_complex_level_10.tenant_normal.app_normal.operation_write_sustained. Please try again later."
}
}
}
Steps to reproduce
- Throttle the /tabs end point, by sending multiple tab addition requests for microsoft teams channels.
- Use microsoft graph SDK for java to add tab in channel.
Question
- Why sometimes "Transfer-Encoding = chunked" header is missing?
- Is there any workaround to this problem, so that I can use microsoft graph sdk ?