You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code in examples/ErrorHandling/HandleKeywordPolicyViolations.php doesn't work because policy violations of a keyword are thrown as ApiExceptions and not as GoogleAdsExceptions.
For instance, here are the first lines an error received for a policy violation:
object(Google\ApiCore\ApiException)#28230 (11) { ["message":protected]=> string(3883) "{ "message": "Request contains an invalid argument.", "code": 3, "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.ads.googleads.v15.errors.GoogleAdsFailure", "errors": [ { "errorCode": { "policyViolationError": "POLICY_ERROR" }, "message": "A policy was violated. See PolicyViolationDetails for more detail.", "trigger": { "stringValue": "Atestado para Comprovar Rela\u00e7\u00e3o de Prestador de Servi\u00e7os" }, "location": { "fieldPathElements": [ { "fieldName": "operations", "index": 0 }, { "fieldName": "create" }, { "fieldName": "keyword" }, { "fieldName": "text" } ] }, "details": { "policyViolationDetails": { "externalPolicyDescription": [...]
As you can see, this is an ApiException. So I can't access the associated policyViolationDetailsKey and thus can't ask for an exemption.
What am I missing?
The text was updated successfully, but these errors were encountered:
The code in examples/ErrorHandling/HandleKeywordPolicyViolations.php doesn't work because policy violations of a keyword are thrown as ApiExceptions and not as GoogleAdsExceptions.
For instance, here are the first lines an error received for a policy violation:
As you can see, this is an ApiException. So I can't access the associated policyViolationDetailsKey and thus can't ask for an exemption.
What am I missing?
The text was updated successfully, but these errors were encountered: