Hi,
A week ago we migrated from v201609 to v201705 and since then our handler
of RATE_EXCEEDED stopped working.
We followed the migrate guides of both v201702 and v201705 and didn't
notice any remind of this change.
Our code that worked for a long time:
if(e instanceof ApiException){
for (ApiError error : ((ApiException)e).getErrors()) {
if (error instanceof RateExceededError) {
RateExceededError rateExceeded = (RateExceededError) error;
Thread.sleep(rateExceeded.getRetryAfterSeconds() * 1000);
}
}
}
Now it doesn't work because the relevant exception is an instance of
DetailedReportDownloadResponseException and not ApiException
HTTP Response Code: 400, Type: RateExceededError.RATE_EXCEEDED
at com.google.api.ads.adwords.lib.utils.v201705.
DetailedReportDownloadResponseException$Builder.build(
DetailedReportDownloadResponseException.java:35)
at com.google.api.ads.adwords.lib.utils.AdHocReportDownloadHelperImpl.
handleResponse(AdHocReportDownloadHelperImpl.java:117)
at com.google.api.ads.adwords.lib.utils.AdHocReportDownloadHelperImpl.
downloadReport(AdHocReportDownloadHelperImpl.java:60)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.api.ads.common.lib.utils.AdsUtilityInvocationHandler.
handleInvocation(AdsUtilityInvocationHandler.java:46)
at com.google.common.reflect.AbstractInvocationHandler.invoke(
AbstractInvocationHandler.java:84)
at com.sun.proxy.$Proxy33.downloadReport(Unknown Source)
at com.google.api.ads.adwords.lib.utils.AdHocReportDownloadHelper.
downloadReport(AdHocReportDownloadHelper.java:46)
at com.google.api.ads.adwords.lib.utils.v201705.ReportDownloader.
downloadReport(ReportDownloader.java:73)
What are we missing?
Thanks
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/4dd0a995-65bd-44a1-9385-c2c17183360d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.