Re: How to avoid PolicyViolationError beorehand in scripts

2018-12-20 Thread Евгений Гардыш
Thanks for your reply. Already done using setValidateOnly + my own code + try/catch construction to avoid PHPscript stop. The main thing for all who will use $session->setValidateOnly(true); in their working scripts - don`t forget to use $session->setValidateOnly(false); when you need to contin

Re: How to avoid PolicyViolationError beorehand in scripts

2018-12-20 Thread 'Dhanya Sundararaju (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi, You can set the $session->setValidateOnly(true); This will only validate the keyword. In other words, no objects will be created, but exceptions will still be thrown. You can refer to this sample code

How to avoid PolicyViolationError beorehand in scripts

2018-12-20 Thread Евгений Гардыш
Hi. Sometimes I encountering PolicyViolationError during scripts work. For example: PHP Fatal error: Uncaught Google\AdsApi\AdWords\v201809\cm\ApiException: [ PolicyViolationError{super=PolicyViolationError.POLICY_ERROR @ operations[3 ].operand.criterion.text; trigger:'в +капсулах', key=PolicyVio