-
Notifications
You must be signed in to change notification settings - Fork 358
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
Strange behavior of RateExceededError.RATE_EXCEEDED #121
Comments
Hi, I saw on the forum post that you recently upgraded from 2.20.0 to 3.5.0. I just compared the source for reporting utilities between those versions, and I haven't found any related changes. Are you 100% sure that in 2.20.0 you were getting a
In contrast, calls to non-reporting services such as Thanks, |
Josh is right. There shouldn't be such a behavior change. The RateExceededError just wraps underlying AdWords API exception that is not related to rate limiting or is not retriable. For reporting downloading, it never (in any previous versions) throws ApiException (see the list of possible exceptions from Josh), so there's no way for RateExceededError to contain an ApiException. On the other hand, for other services (such as CampaignService), they may throw ApiException, therefore the RateExceededError may contain an ApiException. I guess what you saw (RateExceededError with an internal ApiException) was from an AdWords API service call, instead of report downloading. |
Probably you're right, we have a common wrapper for all the API calls, both services and reporting. Apparently we catched this exception from some service call. Sorry about that. This explanation raises another question - any reason not to throw ApiException in the report downloading as well? This kind of exception requires a special handling which on its side requires additional info like scope and recommended sleep duration. Thanks |
This is a question to the client library, and I'm sure Josh can share some insights. On the RateLimiter side, yes it differentiates report downloading and services, and handles rate limits (scope, wait after seconds) of two categories separately. |
Hi, Having the report downloader throw ApiException is an interesting idea. It's a bit of a challenge for the following reasons. No WSDL for reportingUnlike with the SOAP services such as Where to introduce
|
Hi, While reviewing open issues, I gave this one some more thought, and I recommend detecting rate limit errors using the approach employed by the RateLimiter extension, as shown in its ApiReportingRetryStrategy. I mention this because upon further review, having The reporting classes in the library currently are not dependent on the SOAP toolkit (Axis or JAX-WS) or the toolkit-specific and API version-specific classes generated from WSDLs, such as:
This is a good thing, as it means users who are only interested in running reports can simply depend on the If we make Given the above, I'm going to close this issue, but feel free to reopen it if you have additional questions or ideas on this topic. Thanks, |
Hi,
I opened a thread in the AdWords group and they asked to post it here too (https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/adwords-api/jlYlnR5BEaI)
Looks like in the new lib (3.5.0) RateExceededError.RATE_EXCEEDED exception is an instance of DetailedReportDownloadResponseException and not ApiException as before.
TTP 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)
The text was updated successfully, but these errors were encountered: