Catching Failures

57 views
Skip to first unread message

charles...@gmail.com

unread,
Nov 16, 2022, 9:02:12 AM11/16/22
to Google Ads API and AdWords API Forum
Hello, I've been getting various errors with the API (not rate-limits) for several weeks and I'm trying to find a way to catch these or automatically retry rather than halting my scripts. 

A few examples: 
Ex 1: Can't connect to accounts.google.com:443 (Temporary failure in name resolution)
Ex 2: The service is currently unavailable
Ex 3: The request took too long to respond.

I am looking into using partial failures, but I don't think this would catch many of the examples I gave above as they were connectivity failures (ie: name resolution error). I'm also unclear which methods support partial failures (I didn't see a list?), in particular does KeywordPlanning methods support this (ie: Google::Ads::GoogleAds::V11::Services::KeywordPlanIdeaService::KeywordAndUrlSeed)? 

If Partial failures can be used against all 3 of the examples above, would you be able to share a list of methods that partial failures are supported (Perl Client Libraries)? 

Thank You

Google Ads API Forum Advisor

unread,
Nov 16, 2022, 3:01:38 PM11/16/22
to charles...@gmail.com, adwor...@googlegroups.com
Hi Charles,

Thank you for reaching out to our API support team.

These errors if encountered consistently would need to be raised to the rest of our API support team for further investigation. That said, could you also provide each of the separate (request, response, request-id) logs that were generated per error? If you haven't yet, (Perl) logging can be enabled by referring to this guide, and by using the DEBUG log setting.

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

As for the partial failures feature, we currently do not have a complete list at the moment of which services it is supported. These should be visible in certain API service's documentation (ex. CampaignService's mutate method). Unfortunately, however, the KeywordPlanIdeaService and its methods currently do not support the partial failures feature.

In addition, you may also reach out directly to the Perl client library owners via this link, for additional insight on other possible alternatives regarding error handling.

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2gPRMV:ref

charles...@gmail.com

unread,
Nov 17, 2022, 1:44:51 PM11/17/22
to Google Ads API and AdWords API Forum
Hi, 

These errors are happening just 3-4 times per day (out of thousands of requests), but the issue is that it halts the script rather than just reporting a failure or retrying. It does not appear that KeywordPlanIdeaService has the support to catch errors, so I'm not sure anything can be done about this. 

Charles

Google Ads API Forum Advisor

unread,
Nov 17, 2022, 9:08:35 PM11/17/22
to charles...@gmail.com, adwor...@googlegroups.com
Hi Charles,

Thank you for the reply.

For our team to further check and validate why you are encountering this, could you please provide us the complete API logs (request and response with request-id) generated on your end, like what my colleague Peter requested? Note that this can be requested or provided to the developer handling the Google Ads API transactions when logging of the API requests has been enabled.

This is the specific guideline to enable Perl.
You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

In addition, could you confirm if you have already reached out directly to the Perl client library owners via this link for additional insight on other possible alternatives regarding error handling?

Best regards,
Google Logo
Heidi
Google Ads API Team
 


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