Thanks Matt - follow up question - the docs you linked state that 
partial_failure method isn't available for get requests -

Is there something we can use for get requests?

That's all we are doing is get requests - getting a daily list of accounts, 
then their ad performance reports like this:

def get_batch_list(customer_id, query):
message = "getting batch list for " + str(customer_id)
logger(message)
response = ga_service.search_stream(request = None,
customer_id = str(customer_id),
query = query)
batch_list = []
try:
for batch in response:
message = str(len(batch.results)) + " items found"
logger(message)
batch_list.append(batch.results)
return batch_list
except google.ads.google_ads.errors.GoogleAdsException as ex:
logger('Request with ID "%s" failed with status "%s" and includes the '
'following errors:' % (ex.request_id, ex.error.code().name))
for error in ex.failure.errors:
logger('\tError with message "%s".' % error.message)
if error.location:
for field_path_element in error.location.field_path_elements:
logger('\t\tOn field: %s' % field_path_element.field_name)
sys.exit(1)


Thanks!
On Thursday, October 14, 2021 at 11:37:27 AM UTC-4 adsapi wrote:

> Hello,
>
> Thanks for reaching out. The best way to handle this scenario is to enable 
> partial 
> failure 
> <https://developers.google.com/google-ads/api/docs/best-practices/partial-failures>.
>  
> Setting partialFailure to *true* will allow you to handle failed 
> operations separately at the end without abruptly ending your request. 
>
> Regards,
> Matt
> Google Ads API Team
>
> [image: Google Logo] 
> Matt 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2PJJ2i:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/480ffb98-01c1-4fa0-a954-e86a3ff6a5ean%40googlegroups.com.
  • cu... 'INI GlobalOps' via AdWords API and Google Ads API Forum
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... 'INI GlobalOps' via AdWords API and Google Ads API Forum
        • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to