RetryCount & RateExceededError handling: use both or is RetryCount enough?

21 views
Skip to first unread message

bzwi...@gmail.com

unread,
Sep 11, 2017, 4:11:39 PM9/11/17
to AdWords API Forum
Hi,

I'm using the .NET client library for the Adwords API and I noticed that there is an example here which shows a retry strategy for the RateExceededError exception. On the GitHub wiki - here - it says that setting RetryCount in app.config also takes care of retrying when there is an RateExceededError exception. I'd prefer using RetryCount if this automatically takes care of RateExceededError, but is it still necessary to implement the retry logic myself? Thanks in advance!

Kind regards,
B. Zwier

Vincent Racaza (AdWords API Team)

unread,
Sep 12, 2017, 12:04:25 AM9/12/17
to AdWords API Forum
Hi B. Zwier,

If you have set the RetryCount in your client library, then it will automatically retry your failed requests on a number of times depending on your value for this property. However, this does not guarantee that the RateExceeded error will be resolved after a max number of retries since this error contains retryAfterSeconds based on the guide.

Since this error contains retryAfterSeconds, then you still need to implement error handling as specified in the example. This handles the retryAfterSeconds specifically in this code snippet:

Thread.Sleep(rateExceededError.retryAfterSeconds * 1000);
retryCount
= retryCount + 1;

Let me know if you have further clarifications.

Thanks,
Vincent
AdWords API Team
Reply all
Reply to author
Forward
0 new messages