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

RetryPolicy is broken in case of rate limiting #334

Open
jrmeland opened this issue Oct 11, 2024 · 0 comments
Open

RetryPolicy is broken in case of rate limiting #334

jrmeland opened this issue Oct 11, 2024 · 0 comments

Comments

@jrmeland
Copy link

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

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.<ExecuteAction>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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant