intuit / intuit/QuickBooks-V3-DotNET-SDK
RetryPolicy is broken in case of rate limiting
- Dominant language
- C#
- Stars
- 121
- Forks
- 145
- Avg merge
- 17h 1m
- Merged PRs (30d)
- 1
Description
I have the scenario where I started getting rate limited e.g. `TooManyRequests`
I then implemented an exponential backoff retry as described in [the docs](https://developer.intuit.com/app/developer/qbo/docs/develop/sdks-and-samples-collections/net/retries)
Now I am getting the issue `This operation cannot be performed after the request has been submitted`
Stack trace:
```
This operation cannot be performed after the request has been submitted., Stack = at System.Net.HttpWebRequest.GetResponse()
ndOrPayInvoiceBulkAsync() > at Intuit.Ipp.Core.Rest.SyncRestHandler.CallRestService(HttpWebRequest request)
ndOrPayInvoiceBulkAsync() > at Intuit.Ipp.Core.IntuitRetryPolicy.<>c__DisplayClass23_0.b__0()
ndOrPayInvoiceBulkAsync() > at Intuit.Ipp.Core.IntuitRetryPolicy.ExecuteAction[TResult](Func`1 func)
ndOrPayInvoiceBulkAsync() > at Intuit.Ipp.Core.Rest.SyncRestHandler.GetResponse(HttpWebRequest request)
ndOrPayInvoiceBulkAsync() > at Intuit.Ipp.QueryFilter.QueryService`1.ExecuteIdsQuery(String idsQuery, QueryOperationType queryOperationType)
```
I am not sure if I am doing something wrong. But it seems like the retry logic is calling `GetResponse` multiple times on the failed request and this is causing issues. Does retries work at all? Do I need to try one of the other strategies?
Thanks!
[Relevant post](https://help.developer.intuit.com/s/question/0D5TR00000Llawu0AB/after-upgrade-getting-new-errors-this-operation-cannot-be-performed-after-the-request-has-been-submitted?t=1728611111868)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.