Why are PolicyFindingError thrown by AdServiceInterface instead of returned as partial errors?

38 views
Skip to first unread message

Markus Heiden

unread,
Jun 11, 2019, 11:06:40 AM6/11/19
to AdWords API and Google Ads API Forum
Hello,

AdServiceInterface.mutate throws an ApiException for PolicyFindingErrors instead of returning them as partial errors, though AdReturnValue supports partial errors.
Are the operations without errors executed anyway or does an exception always mean that all operations of the request have not been executed?
In contrast AdGroupAdServiceInterface.mutate did not throw in the same case.
Am I doing something  wrong or why behave these methods differently?

Google Ads API Forum Advisor Prod

unread,
Jun 13, 2019, 1:57:34 AM6/13/19
to adwor...@googlegroups.com
Hi Markus,

Thanks for pointing this out. You may refer to this guide for the list of services that supports partialFailures. I have taken note of this discrepancy and will inform the rest of the team to update the documentation as needed.

As for your AdGroupAdService.mutate() request that you expected to return some failures but didn't, could you provide more information such as the complete SOAP request and response logs so I can further investigate? You may reply using the Reply privately to author option.

Best regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001UBmheV:ref

Markus Heiden

unread,
Jun 13, 2019, 4:55:39 AM6/13/19
to AdWords API and Google Ads API Forum
Hi Peter,

before we just created ads via the AdGroupAdServiceInterface.mutate(), which supports partial failures. So the successful operations are executed and the failed ones are reported.

Now we additionally update ads via AdServiceInterface.mutate(). I am not sure how to reliably update ads without partial failures support.
a) Are the operations without reported failure of an overall failing request are executed anyway? Then this is fine for me, because I don't need any information about the successful updates and can just report the failures.
b) or do I need to re-execute the failed request without the failed operations? This would be kind of cumbersome.
c) or are there other ways to handle that?

Best regards,
Markus

Google Ads API Forum Advisor Prod

unread,
Jun 14, 2019, 4:59:36 PM6/14/19
to markus...@adsoul.com, adwor...@googlegroups.com
Hello Markus,

I'm not sure if the Partial Failure guide is up-to-date on if AdService is supported or not. Usually when an object is supported with partial failure in one service, it's supported in another, but this may be an exception. I'll go check on that for you.  

In the meantime, let's see if I can answer your other questions. When you get a full-blown error like that without any partial failure errors coming back, that means the whole request failed. You'll have to resend the entire request.

I'll get back to you when I hear back on the support for partial failure.

Best,
Nadine Sundquist, Google Ads API Team

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