Hi Peter,

Thank you for your answer. There is no error message as such, to validate 
the Ad Text the code uses $this->session->setValidateOnly(true); first, 
then ApiException is caught and code adds exemption to operation by using 
$operation->setExemptionRequests([new ExemptionRequest($error->getKey())]) 
but in PHP library it only adds one exception to array, where 2 needed. So 
next step code executes mutate() with $this->session->setValidateOnly(false
); but it will not pass as PolicyViolationError will be thrown.

It it helps I have response object from the library error handling:

Google\AdsApi\AdWords\v201708\cm\PolicyViolationError Object ( [key:
protected] => Google\AdsApi\AdWords\v201708\cm\PolicyViolationKey Object ( [
policyName:protected] => tobacco [violatingText:protected] => cigarettes ) [
externalPolicyName:protected] => Tobacco and Cigarettes [externalPolicyUrl:
protected] => [externalPolicyDescription:protected] => Google does not 
permit the advertisement of tobacco and tobacco-related products. Please 
see our full policy 
<http://adwords.google.com/support/bin/static.py?page=guidelines.cs&topic=9271&subtopic=9279&answer=47228>
. [isExemptable:protected] => 1 [violatingParts:protected] => Array ( [0] => 
Google\AdsApi\AdWords\v201708\cm\PolicyViolationErrorPart Object ( [index:
protected] => 0 [length:protected] => 10 ) ) [fieldPath:protected] => 
operations[0].operand.ad.finalUrls [fieldPathElements:protected] => Array ( 
[0] => Google\AdsApi\AdWords\v201708\cm\FieldPathElement Object ( [field:
protected] => operations [index:protected] => 0 ) [1] => Google\AdsApi\
AdWords\v201708\cm\FieldPathElement Object ( [field:protected] => operand [
index:protected] => ) [2] => Google\AdsApi\AdWords\v201708\cm\
FieldPathElement Object ( [field:protected] => ad [index:protected] => ) [3] 
=> Google\AdsApi\AdWords\v201708\cm\FieldPathElement Object ( [field:
protected] => finalUrls [index:protected] => ) ) [trigger:protected] => [
errorString:protected] => PolicyViolationError.POLICY_ERROR [ApiErrorType:
protected] => PolicyViolationError [parameterMap:Google\AdsApi\AdWords\
v201708\cm\ApiError:private] => Array ( [ApiError.Type] => ApiErrorType ) )


I'm unable to use out of the library code as a whole project is deeply 
integrated with PHP Library methods.

Thanks. 


On Monday, August 21, 2017 at 4:59:22 AM UTC+1, Peter Oliquino wrote:
>
> Hi Denys,
>
> You should be able to send an array of ExemptionRequests 
> <https://developers.google.com/adwords/api/docs/reference/v201708/AdGroupAdService.AdGroupAdOperation#exemptionRequests>
>  regardless 
> of the client library you use. However, to further investigate, could you 
> provide any logs such as the SOAP request and response that my contain an 
> error message? If you haven't enabled SOAP logging yet, you may refer to 
> this guide 
> <https://github.com/googleads/googleads-php-lib#user-content-logging> as 
> to how. You may reply using *Reply privately to author*.
>
> Best regards,
> Peter
> AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/3b9d247f-072b-4a16-a59d-fbf9c3440aa6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to