Thanks Vishal, followed your advice and am throwing a RateExceededError
that replicates what a real one looks like using the following code:
$rateExceededError = new
\Google\AdsApi\AdWords\v201702\cm\RateExceededError("", null,
"","RateExceededError.RATE_EXCEEDED", "RateExceededError",
"RATE_EXCEEDED","RequestsPerMinute", "ACCOUNT", 30);
$apiException = new \Google\AdsApi\AdWords\v201702\cm\ApiException(null,
null, null, [$rateExceededError]);
// Now do something with $apiException
On Monday, May 1, 2017 at 9:08:26 AM UTC-7, Vishal Vinayak (Adwords API
Team) wrote:
>
> Hi,
>
> You can also check out the procedure mentioned in this example
> <https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201702/ErrorHandling/HandlePolicyViolationError.php#L90>
> and
> check if the error is an instance of RateExceededError and perform action
> in your code accordingly. Although their is no direct way to simulate
> RateExceededError in your API call, you can try to throw
> <https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201702/ErrorHandling/HandlePolicyViolationError.php#L86>
> the RateExceededError
> manually in your code for that purpose. Also, an additional resource,
> although available in Java programming language only, is the RateLimiter
> extension
> <http://googleadsdeveloper.blogspot.com/2017/04/introducing-ratelimiter-extension-in.html>
> which
> can help handle rate limiting related issues by changing a few lines of
> code. Please revert if you have additional questions or concerns.
>
> Regards,
> Vishal, AdWords API Team
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/c206316d-24f7-4c19-8d89-d085296f1fa9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.