Hi Xiaoming,
Thanks a lot for the quick reply.
I added the logger as mentioned, but it logs only the requests and not the SOAP response of the error (Please find the details below).
Here’s the snippet of the code:
```
API_VERSION = :v201809
api = AdwordsApi::Api.new(config)
report_utils = api.report_utils(API_VERSION)
target_xml = report_utils.download_report(report_definition)
```
Log from console:
```
.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/google-adwords-api-1.5.0/lib/adwords_api/report_utils.rb:300:in `check_for_xml_error': HTTP code: 400, error type: 'RateExceededError.RATE_EXCEEDED', trigger: 'Basic Access Daily Reporting Quota', field path: '' (AdwordsApi::Errors::ReportXmlError)
from .rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/google-adwords-api-1.5.0/lib/adwords_api/report_utils.rb:284:in `check_for_errors’
```
Logs from logger file:
```
D, [2019-11-19T12:15:49.259882 #90398] DEBUG -- : HTTP headers: [Content-Type: application/x-www-form-urlencoded, Authorization: Bearer <token>, User-Agent: <agent> (AwApi-Ruby/1.5.0, Common-Ruby/1.0.2, GoogleAdsSavon/1.0.3, ruby/2.4.4, HTTPI/2.4.4, httpclient), clientCustomerId: <client id>, developerToken: <token>]
D, [2019-11-19T12:15:49.259915 #90398] DEBUG -- : __rdxml=%3CreportDefinition%3E%3Cselector%3E%3Cfields%3ECampaignId%3C%2Ffields%3E%3Cfields%3EImpressions%3C%2Ffields%3E%3Cfields%3EClicks%3C%2Ffields%3E%3Cfields%3ECost%3C%2Ffields%3E%3Cpredicates%3E%3Cfield%3ECampaignId%3C%2Ffield%3E%3Coperator%3EIN%3C%2Foperator%3E%3Cvalues%3E<value>%3C%2Fpredicates%3E%3CdateRange%3E%3Cmin%3E20191118%3C%2Fmin%3E%3Cmax%3E20191118%3C%2Fmax%3E%3C%2FdateRange%3E%3C%2Fselector%3E%3CreportName%3E-%3C%2FreportName%3E%3CreportType%3ECAMPAIGN_PERFORMANCE_REPORT%3C%2FreportType%3E%3CdateRangeType%3ECUSTOM_DATE%3C%2FdateRangeType%3E%3CdownloadFormat%3EXML%3C%2FdownloadFormat%3E%3C%2FreportDefinition%3E
D, [2019-11-19T12:15:49.260264 #90398] DEBUG -- : HTTPI /peer POST request to
adwords.google.com (httpclient)
D, [2019-11-19T12:15:50.833572 #90398] DEBUG -- : HTTP headers: [Content-Type: text/xml, Content-Encoding: gzip, Date: Tue, 19 Nov 2019 06:45:50 GMT, Expires: Tue, 19 Nov 2019 06:45:50 GMT, Cache-Control: private, max-age=0, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, X-XSS-Protection: 1; mode=block, Server: GSE, Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000, Transfer-Encoding: chunked]
```
Can you guide me in what could be the possible reason for rate limit error and how to fix it?
The code has not changed in last 5 months, but this RateLimitIssue started coming only from 14th November 2019.
-
Thank you,
Murtaza Basrai