HI Mitchell,
as you mentioned earlier that partial failures are allowed
in AdwordsUserListService. However when I am trying to add some users in
the existing user list then I am not able to implement the partial failure.
please refer below code and point out the area where we can implement the
partial failure.
try
{
using (var userListService =
(AdwordsUserListService)
user.GetService(AdWordsService.v201809.AdwordsUserListService))
{
//set the partial Failure as true
userListService.RequestHeader.partialFailure = true;
// Create operation to add members to the user list
based on email
MutateMembersOperation mutateMembersOperation = new
MutateMembersOperation
{
operand = new MutateMembersOperand
{
userListId = long.Parse(audienceId),
membersList = members.ToArray()
},
@operator = Operator.ADD
};
//Add members to the user list/audience based on the
provided member list
MutateMembersReturnValue mutateMembersResult =
userListService.mutateMembers(
new MutateMembersOperation[]
{
mutateMembersOperation
});
}
}
catch (AdWordsApiException adWordsApiException)
{
var apiException = adWordsApiException.ApiException as
ApiException;
if (apiException != null)
{
foreach (var apiExceptionError in apiException.errors)
{
}
}
}
catch (Exception e)
{
throw new System.ApplicationException(
"Failed to add user lists " +
"(a.k.a. audiences) and upload email addresses.", e);
}
Thanks,
Abhinav
On Saturday, 30 May 2020 00:34:42 UTC+10, adsapiforumadvisor wrote:
>
> Hi Abhinav,
>
> Please see here
> <https://developers.google.com/adwords/api/docs/guides/partial-failure#c_3>
> for more information about getting the partial failure values and a more in
> depth example here
> <https://developers.google.com/adwords/api/docs/samples/csharp/error-handling#handle-partial-failures>.
>
> Please share your code if you are still having.
>
> @cv, the documentation shows that both partial failure and validate only
> should be supported for that service. I will monitor that thread and take
> the appropriate action.
>
> Regards,
> Mitchell
> Google Ads API Team
>
> ref:_00D1U1174p._5001UaRix7:ref
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/c27bbb7a-4169-4f07-82b1-5720f145f783o%40googlegroups.com.