Re: Which API errors should be retried?

2014-11-20 Thread Oliver
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

Re: Which API errors should be retried?

2014-11-20 Thread Kristopher Windsor
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 =

Re: Which API errors should be retried?

2014-11-20 Thread Michael Cloonan (AdWords API Team)
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

Re: Which API errors should be retried?

2014-11-19 Thread Michael Cloonan (AdWords API Team)
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

Which API errors should be retried?

2014-11-18 Thread Kristopher Windsor
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: