Hi Peter,
I wish to catch this error but i can't do it.
it does not work.
and as I can't catch this exception, the fatal error crash my application 
and I can't make sure to slow down the calls.
This is especially my problem why the exception is not caught.
Thanks for your help
Le vendredi 23 novembre 2018 11:59:45 UTC+1, Peter Oliquino (AdWords API 
Team) a écrit :
>
> Hi David,
>
> The *rateScopre=ACCOUNT* that you are getting indicates that you're 
> making too many requests at the same time against a single AdWords account. 
> You can avoid this by decreasing the number of calls you make, and if you 
> wish to catch this error or slow down your calls, you can refer to this 
> section 
> <https://developers.google.com/adwords/api/docs/guides/rate-limits#slow_down> 
> of 
> our rate limits 
> <https://developers.google.com/adwords/api/docs/guides/rate-limits> guide.
>
> Let me know if this helps.
>
> Thanks,
> Peter
> AdWords API Team
>
> On Friday, November 23, 2018 at 4:37:27 PM UTC+8, David Moate wrote:
>>
>>
>> Hello i have this issue.
>>
>>         try{
>>
>>           // Generate a refreshable OAuth2 credential for authentication.
>>           $oAuth2Credential = (new OAuth2TokenBuilder())
>>               ->fromFile()
>>               ->build();
>>           // Construct an API session configured from a properties file 
>> and the OAuth2
>>
>>           // credentials above.
>>
>>           $session = (new AdWordsSessionBuilder())
>>               ->fromFile()
>>               ->withOAuth2Credential($oAuth2Credential)
>>
>>               ->build();
>>
>>           $result = $this->EstimateKeywordTraffic(new AdWordsServices(), 
>> $session);
>>         }
>>         catch (ApiException $apiException) {
>>             print_r($apiException);
>>         }
>>
>> below my error:
>> Fatal error: Uncaught Google\AdsApi\AdWords\v201802\cm\ApiException: 
>> [RateExceededError <rateName=RATE_LIMIT, rateKey=null, rateScope=ACCOUNT, 
>> retryAfterSeconds=30>] in 
>> /home/refleadfem/www/france/wp-content/plugins/adwords-plugin/library/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php:39
>>  
>> Stack trace: #0 
>> /home/refleadfem/www/france/wp-content/plugins/adwords-plugin/library/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php(39):
>>  
>> ReflectionClass->newInstanceArgs(Array) #1 
>> /home/refleadfem/www/france/wp-content/plugins/adwords-plugin/library/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(165):
>>  
>> Google\AdsApi\Common\Util\Reflection->createInstance('Google\\AdsApi\\A...', 
>> Array) #2 
>> /home/refleadfem/www/france/wp-content/plugins/adwords-plugin/library/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(130):
>>  
>> Google\AdsApi\Common\AdsSoapClient->parseApiExceptionFromSoapFault(Object(SoapFault))
>>  
>> #3 /home/refleadfem/ in 
>> /home/refleadfem/www/france/wp-content/plugins/adwords-plugin/library/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php
>>  
>> on line 39
>>
>> i wrote use Google\AdsApi\AdWords\v201708\cm\ApiException;
>> but it does not work.
>> how to catch this execption thank you for helping me.
>> my goal is to slow down calls as soon as I catch the exception
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
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/13423b80-f407-4848-b438-d80bcdb29241%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... David Moate
    • ... 'Peter Oliquino (AdWords API Team)' via AdWords API and Google Ads API Forum
      • ... David Moate
        • ... 'Peter Oliquino (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to