Bug in CampaignFeedService

13 views
Skip to first unread message

FW API

unread,
Jul 25, 2019, 10:21:45 AM7/25/19
to AdWords API and Google Ads API Forum
Hello, 

we have encountered a probable bug in CampaignFeedService. We have send a request with a CONTAINS_ANY clause according to this documentation:

- The operation apparently worked: The correct four locations are now listed with the campaign. 
- But the soap response contained a FunctionError.INVALID_NUMBER_OF_OPERANDS.

I'll append redacted soap log:


SOAP request:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809" soapenv:mustUnderstand="0">
            <ns1:clientCustomerId>9367243494</ns1:clientCustomerId>
            <ns1:developerToken>REDACTED</ns1:developerToken>
            <ns1:userAgent>REDACTED (AwApi-Java, AdWords-Axis/4.1.0, Common-Java/4.1.0, Axis/1.4, Java/1.8.0_181, maven, SelectorBuilder)</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>false</ns1:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <operations>
                <operator>SET</operator>
                <operand>
                    <feedId>100969912</feedId>
                    <campaignId>2075545651</campaignId>
                    <matchingFunction>
                        <functionString>CONTAINS_ANY(FeedAttribute[100969912,14],{"176","047","105","175"})</functionString>
                    </matchingFunction>
                    <placeholderTypes>7</placeholderTypes>
                </operand>
            </operations>
        </mutate>
    </soapenv:Body>
</soapenv:Envelope>

***********
2019-07-25 16:02:54,908  INFO RemoteCallLoggerDelegate: 
***********
SOAP response:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809">
            <requestId>00058e81e1dbd3c00a3741472207bded</requestId>
            <serviceName>CampaignFeedService</serviceName>
            <methodName>mutate</methodName>
            <operations>1</operations>
            <responseTime>88</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Client</faultcode>
            <faultstring>[FunctionError.INVALID_NUMBER_OF_OPERANDS @ operations[0].operand.matchingFunction.rhsOperand]</faultstring>
            <detail>
                <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201809">
                    <message>[FunctionError.INVALID_NUMBER_OF_OPERANDS @ operations[0].operand.matchingFunction.rhsOperand]</message>
                    <ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="FunctionError">
                        <fieldPath>operations[0].operand.matchingFunction.rhsOperand</fieldPath>
                        <fieldPathElements>
                            <field>operations</field>
                            <index>0</index>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>operand</field>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>matchingFunction</field>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>rhsOperand</field>
                        </fieldPathElements>
                        <trigger/>
                        <errorString>FunctionError.INVALID_NUMBER_OF_OPERANDS</errorString>
                        <ApiError.Type>FunctionError</ApiError.Type>
                        <reason>INVALID_NUMBER_OF_OPERANDS</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

Google Ads API Forum Advisor Prod

unread,
Jul 26, 2019, 3:27:01 AM7/26/19
to adwor...@googlegroups.com
Hi,

Thanks for posting your concern.

Upon checking the provided SOAP logs, I can see that you've set 4 constant operands in the functionString field of matchingFunction. However, according to this documentation, the maximum constant operands that you can set for CONTAINS_ANY operator is three and this is the reason why you encountered the FunctionError.INVALID_NUMBER_OF_OPERANDS.

Let me know if you have further questions.

Regards,
Ejay
Google Ads API Team

ref:_00D1U1174p._5001UEGOvE:ref
Reply all
Reply to author
Forward
0 new messages