Hi Team,

We're currently using the Google Adwords API to do mutations (i.e. inserts, 
updates and remove members) onto our audience lists, and have received an 
error back recently when attempting to remove an audience through an API 
request. The response back had a status code of 500 and the following error 
message: 

Error message: Component [Received Unexpected HTTP 
Response:RECEIVED_UNEXPECTED_HTTP_RESPONSE2] finished with status ERROR. 
(In0: 1 recs) Didn't get valid response from POST: content: 
0005c922dfc2e6f403e7ec9b0d05e813AdwordsUserListServicemutateMembers1158
soap:Client[CollectionSizeError.TOO_FEW 

When diagnosing the error, we've found out that it was actually from a 
malformed request body where we've provided a JSON for the MemberLists 
object instead of the expected SOAP XML tag (i.e. <memberList> <hasedEmail> 
</hashedEmail> </memberList>):

<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<soapenv:Header>
<ns1:RequestHeader 
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"; 
soapenv:mustUnderstand="0" 
xmlns:ns1="https://adwords.google.com/api/adwords/rm/v201809";>
<ns1:clientCustomerId>???-???-????</ns1:clientCustomerId>
<ns1:developerToken>ASDyeCacwnHAs5wd1369cQ</ns1:developerToken>
<ns1:userAgent>example.com:AudiencePost:V1.0</ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:partialFailure>false</ns1:partialFailure>
</ns1:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<mutateMembers xmlns="https://adwords.google.com/api/adwords/rm/v201809";>
<operations>
<ns7:operator 
xmlns:ns7="https://adwords.google.com/api/adwords/cm/v201809";>REMOVE</ns7:operator>
<operand>
<userListId>??????????</userListId>
<removeAll>false</removeAll>{"hashedEmail&quot;: 
&quot;5514ff9d5c1bd7b78fd9d441147798c9d2cd821b98c9c65bb5ed757856e9d645&quot; 
}</operand>
</operations>
</mutateMembers>
</soapenv:Body>
</soapenv:Envelope> 

What we're wondering is why the error status code and message received does 
not indicate a malformed/invalid request (e.g. a status code of 400 
indicating a bad request) instead of the "CollectionSizeError.TOO_FEW " 
error message with status code 500.

Cheers,
Greg

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/23422ac1-e0b4-4332-9a85-a9521dd339b2n%40googlegroups.com.

Reply via email to