We retry when we see these errors:
ReportDownloadError.ERROR_GETTING_RESPONSE_FROM_BACKEND
ReportDownloadError.INTERNAL_SERVER_ERROR
ReportDownloadError.ERROR_WRITING_REPORT_TO_FILE
InternalApiError.UNEXPECTED_INTERNAL_API_ERROR
AuthorizationError.CUSTOMER_SYNC_DISABLED
Thanks Michael and Oliver.
I want the default to be do retry, and I wrote this today (PHP):
public static function isRetriable($e){
if ($e instanceof SoapFault @$e-detail-ApiExceptionFault-errors[0
]-enc_value instanceof ApiError){
$err =
Hello,
If you are going to include automatic retry code, please do make sure that
you use an exponential backoff in case you are accidentally retrying
something that is never going to succeed. Even for a call that might
eventually succeed, constantly hitting the server when there are server
Hello,
There is no programmatic way to tell whether an error should be retried or
not. For each use case where you're accessing the API, you should determine
yourself how to handle various error cases.
You can use our common errors
https://developers.google.com/adwords/api/docs/common-errors
Hi,
When the Adwords API throws an Exception, I'd like to know if I should
retry (intermittent errors) or not (bad input on my end).
I am using the PHP client library.
For example, I should retry for this case:
InternalApiError.UNEXPECTED_INTERNAL_API_ERROR
But not for this case: