How to trigger policy violation error?

31 views
Skip to first unread message

tom.wa...@raisingit.com

unread,
Nov 20, 2018, 8:12:13 AM11/20/18
to AdWords API and Google Ads API Forum
Hi everyone,

I'm trying to add some error handling to our scripts for when a policy violation error occurs. I want to trigger such an error so that I can find out how to pull out the various elements of the error message.

I've tried to trigger the error by adding a reserved keyword to a test account using the test API token. However, in the test account it doesn't throw an error - it duly adds the banned keyword.

Is there a guaranteed way I can get the API to throw the error while using the test token?

Cheers,
Tom

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Nov 20, 2018, 2:37:20 PM11/20/18
to AdWords API and Google Ads API Forum
Hi Tom, 

I was able to trigger a policy error while adding "combat knife" as a keyword in my test account. This should trigger a CriterionPolicyError.POLICY_ERROR error. Please give this a try a let me know if this is what you were looking for. 

Thanks,
Sreelakshmi, AdWords API Team

tom.wa...@raisingit.com

unread,
Nov 21, 2018, 6:41:09 AM11/21/18
to AdWords API and Google Ads API Forum
Thanks Sreelakshmi - that does the trick - exactly what I needed!

Cheers,
Tom
Reply all
Reply to author
Forward
0 new messages