Fault occurred while processing - BiddableAdGroupCriterion [v201402] [PHP]

235 views
Skip to first unread message

Kristopher Windsor

unread,
Oct 2, 2014, 9:03:02 PM10/2/14
to adwor...@googlegroups.com
Hi,

I am querying for BiddableAdGroupCriterion, changing the biddingStrategyConfiguration on each criterion, and then trying to send the changes to Adwords. I get this same error regardless if operator is ADD or SET.
How can I fix this?

Thanks,

Code:
  public static function mutateEntities($adwords_user, $campaign_name, $service_name, $ops){
    $service
= $adwords_user->GetService($service_name, ADWORDS_VERSION);

    $opc
= count($ops);
   
if ($opc > 5000)
     
throw new Exception('Too many operations for ' . $service_name);

   
for ($iii = 0; $iii < AdwordsRateLimiter::TOTAL_RETRIES; $iii++){
     
AdwordsRateLimiter::throttle($adwords_user->getClientCustomerId(), $opc);
     
try {
        $service
->mutate($ops);
       
break;
     
} catch (RateExceededError $e){
       
AdwordsRateLimiter::reportError($adwords_user->getClientCustomerId(), $e->rateScope, $e->rateName);
     
} catch (Exception $e ){
       
AdwordsRateLimiter::reportError($adwords_user->getClientCustomerId());
     
}
     
if ($iii + 1 == AdwordsRateLimiter::TOTAL_RETRIES){
        echo ADWORDS_VERSION
. "\n";
        var_dump
($ops);
       
throw new Exception('Adwords query failed after max retries. ' . $e->getMessage());
     
}
   
}

 
}

Output:
v201402
array
(1) {
 
[0]=>
 
object(AdGroupCriterionOperation)#17657 (5) {
   
["operand"]=>
   
object(BiddableAdGroupCriterion)#17669 (18) {
     
["userStatus"]=>
     
string(6) "ACTIVE"
     
["systemServingStatus"]=>
      NULL
     
["approvalStatus"]=>
      NULL
     
["disapprovalReasons"]=>
      NULL
     
["destinationUrl"]=>
      NULL
     
["experimentData"]=>
      NULL
     
["firstPageCpc"]=>
      NULL
     
["topOfPageCpc"]=>
      NULL
     
["qualityInfo"]=>
      NULL
     
["biddingStrategyConfiguration"]=>
     
object(BiddingStrategyConfiguration)#20173 (6) {
       
["biddingStrategyId"]=>
        NULL
       
["biddingStrategyName"]=>
        NULL
       
["biddingStrategyType"]=>
       
string(10) "MANUAL_CPC"
       
["biddingStrategySource"]=>
        NULL
       
["biddingScheme"]=>
        NULL
       
["bids"]=>
        array
(1) {
         
[0]=>
         
object(CpcBid)#20175 (5) {
           
["bid"]=>
           
object(Money)#20176 (3) {
             
["microAmount"]=>
             
int(370000)
             
["ComparableValueType"]=>
              NULL
             
["_parameterMap":"ComparableValue":private]=>
              array
(1) {
               
["ComparableValue.Type"]=>
               
string(19) "ComparableValueType"
             
}
           
}
           
["contentBid"]=>
            NULL
           
["cpcBidSource"]=>
            NULL
           
["BidsType"]=>
            NULL
           
["_parameterMap":"Bids":private]=>
            array
(1) {
             
["Bids.Type"]=>
             
string(8) "BidsType"
           
}
         
}
       
}
     
}
     
["bidModifier"]=>
      NULL
     
["adGroupId"]=>
     
string(11) "17363429715"
     
["stats"]=>
      NULL
     
["criterionUse"]=>
     
string(8) "BIDDABLE"
     
["criterion"]=>
     
object(MobileApplication)#17661 (6) {
       
["appId"]=>
       
string(26) "2-<redacted>"
       
["displayName"]=>
       
string(73) "<redacted>"
       
["id"]=>
       
string(11) "<redacted>"
       
["type"]=>
       
string(18) "MOBILE_APPLICATION"
       
["CriterionType"]=>
       
string(17) "MobileApplication"
       
["_parameterMap":"Criterion":private]=>
        array
(1) {
         
["Criterion.Type"]=>
         
string(13) "CriterionType"
       
}
     
}
     
["forwardCompatibilityMap"]=>
      NULL
     
["AdGroupCriterionType"]=>
     
string(24) "BiddableAdGroupCriterion"
     
["_parameterMap":"AdGroupCriterion":private]=>
      array
(1) {
       
["AdGroupCriterion.Type"]=>
       
string(20) "AdGroupCriterionType"
     
}
   
}
   
["exemptionRequests"]=>
   
string(3) "ADD"
   
["operator"]=>
    NULL
   
["OperationType"]=>
    NULL
   
["_parameterMap":"Operation":private]=>
    array
(1) {
     
["Operation.Type"]=>
     
string(13) "OperationType"
   
}
 
}
}

Fatal error: Uncaught exception 'Exception' with message 'Adwords query failed after max retries. Fault occurred while processing.' in...


Message has been deleted

Kristopher Windsor

unread,
Oct 2, 2014, 9:21:13 PM10/2/14
to adwor...@googlegroups.com
Or without catching the original Exception, the stack trace is:
Fatal error: Uncaught SoapFault exception: [soap:Server] Fault occurred while processing. in /code/bidder/lib/legacy/adwords/Google/Api/Ads/Common/Lib/AdsSoapClient.php:232
Stack trace:
#0 /code/bidder/lib/legacy/adwords/Google/Api/Ads/Common/Lib/AdsSoapClient.php(232): SoapClient->__soapCall('mutate', Array, NULL, Array, Array)
#1 /code/bidder/lib/legacy/adwords/Google/Api/Ads/AdWords/v201402/AdGroupCriterionService.php(8896): AdsSoapClient->__soapCall('mutate', Array)
#2 /code/bidder/lib/adwords/AdwordsCampaignAPI.php(306): AdGroupCriterionService->mutate(Array)
...


Kristopher Windsor

unread,
Oct 2, 2014, 9:40:55 PM10/2/14
to adwor...@googlegroups.com
Nevermind, I found the error. I was doing:

new AdGroupCriterionOperation($op, 'SET')

But AdGroupCriterionOperation does not take a second parameter like AdGroupOperation, so operator was null.
Reply all
Reply to author
Forward
0 new messages