Policy Violation Error does not display correct index

16 views
Skip to first unread message

F B

unread,
Apr 14, 2019, 8:47:39 AM4/14/19
to AdWords API and Google Ads API Forum
I am uploading a bunch of Keywords and it turns out that one of them gets flagged for medical policy violation. When then examining the error the location would be 0, i.e.

def get_error_indices(ex):
duplicates = []
policy_errors = []
for error in ex.failure.errors:
if error.location and 'DUPLICATE' in str(error.error_code):
for field_path_element in error.location.field_path_elements:
if field_path_element.field_name == 'operations':
duplicates.append(field_path_element.index.value)
elif error.location and 'POLICY_ERROR' in str(error.error_code):
for field_path_element in error.location.field_path_elements:
if field_path_element.field_name == 'operations':
policy_errors.append(field_path_element.index.value)
return duplicates, policy_errors

I am handling those errors differently in terms of retries and such. the part for duplicates works fine, the part for policy violations not so much.

Cheers
 

googleadsapi...@google.com

unread,
Apr 15, 2019, 3:47:51 AM4/15/19
to adwor...@googlegroups.com, AdWords API and Google Ads API Forum
Hi,

Could you provide the complete SOAP request and response logs together with your customer ID and error message via Reply privately to author so I can further investigate?

Regards,
Ejay
Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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+unsubscribe@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/4f7d12dd-cd8e-46c6-a761-f8e7c709650f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages