Handling empty partial_failure_error when uploading offline conversions

425 views
Skip to first unread message

Albeiro Ochoa

unread,
Mar 27, 2024, 9:00:14 PM3/27/24
to Google Ads API and AdWords API Forum
Hello Google Ads community,

I am working on a project that involves uploading offline conversions using the Google Ads API VER 14. I have implemented the code to send conversions using the ConversionUploadService and the upload_click_conversions method.

The issue I am facing is that, even though the conversions seem to be uploaded successfully to Google Ads and are showing as having excellent data quality in the platform, I am not seeing the expected success message "Conversion uploaded successfully." in the console output.

Upon further investigation, I noticed that the response from the Google Ads API contains a partial_failure_error field, but this field is empty (it doesn't contain any error details). This is causing my code to enter the partial failure error handling logic, even when there are no error details present.

Here's a relevant part of my code:

if response.partial_failure_error:
    logger.warning("Partial failure errors encountered:")
    for error in response.partial_failure_error.details:
        logger.warning(error)
    logger.error(f"Partial failure error details: {response.partial_failure_error.details}")
    return {"success": False, "error": str(response.partial_failure_error)}
else:
    logger.info("Conversion uploaded successfully.")
    print("Conversion uploaded successfully.")
    for result in response.results:
        logger.info(f"Conversion with GCLID {result.gclid} uploaded successfully.")
        print(f"Conversion with GCLID {result.gclid} uploaded successfully.")
    return {"success": True, "error": None}

And here's an excerpt from the logs showing the API response: 2024-03-27 18:46:22,711 - INFO - Conversion upload response: results {
gclid: "CjwKCAjwnv-vBhBdEiwABCYQA7dPM3qAtyJdmHQQtv77tF_qHwDSa9KQ6mPkpSON0IZrCU82TvhVGBoC9EAQAvD_BwE"
conversion_action: "customers/7385152398/conversionActions/6772748552"
conversion_date_time: "2024-03-24 18:40:00+00:00"
}
job_id: 5950565033604606275

2024-03-27 18:46:22,713 - WARNING - Partial failure errors encountered:

2024-03-27 18:46:22,713 - ERROR - Partial failure error details: [] My question is: why is the Google Ads API returning an empty partial_failure_error even when the conversion appears to have been uploaded successfully? Is there any specific reason for this behavior? How is it recommended to handle this case in the code?

I would appreciate any guidance or clarification you can provide on this matter. If you need more details or additional information, please let me know.

Thank you in advance for your help.

Google Ads API Forum Advisor

unread,
Mar 28, 2024, 7:56:53 AM3/28/24
to albei...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team. 

By reviewing your query, I understand that you're encountering a "Partial failure error". I would recommend you refer to the partial failure documentation for more information.

However, If you are still facing the same issue, please provide us with the complete API logs (request and response with request-id and request header) generated at your end. 

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02s0IrK:ref" (ADR-00229016)

Thanks,
 
Google Logo Google Ads API Team


Albeiro Ochoa

unread,
Mar 28, 2024, 1:53:59 PM3/28/24
to Google Ads API and AdWords API Forum
In fact, the log I included is precisely because I have enabled logging in my Python code to capture the complete API logs. Below, I share with you the relevant log I obtained when reproducing the problem:


2024-03-27 18:46:22,711 - INFO - Conversion upload response: results {
gclid: "CjwKCAjwnv-vBhBdEiwABCYQA7dPM3qAtyJdmHQQtv77tF\\_qHwDSa9KQ6mPkpSON0IZrCU82TvhVGBoC9EAQAvD\\_BwE"
conversion\\_action: "customers/7385152398/conversionActions/6772748552"
conversion\\_date\\_time: "2024-03-24 18:40:00+00:00"
}
job\\_id: 5950565033604606275


2024-03-27 18:46:22,713 - WARNING - Partial failure errors encountered:
2024-03-27 18:46:22,713 - ERROR - Partial failure error details: []

As you can see in the log, the API response indicates that the conversion was successfully uploaded, as the conversion details and a job ID were received. However, partial failure errors were also encountered, although the error details are empty.

This scenario is consistent with the issue I mentioned earlier, where the conversion appears to be uploaded successfully, but a partial failure error is still encountered without specific details.

I would appreciate it if you could further investigate this issue and provide guidance on why a partial failure error is occurring despite the conversion appearing to have been uploaded successfully. If you need any additional information or context details, please let me know.

Google Ads API Forum Advisor

unread,
Apr 1, 2024, 2:46:01 AM4/1/24
to albei...@gmail.com, adwor...@googlegroups.com
Hi,

I would like to inform you that the information you have provided is not sufficient to investigate the issue. Please be informed that the logs that you have provided are incomplete and do not contain the request method and response in them. 

In order to investigate further, kindly provide us with the updated complete API logs (request and response with request-id and request header) generated at your end to better assist you on this request.

You can share the requested details via Reply privately to the author option or a direct private reply to this email.

Dave Stitz

unread,
Apr 1, 2024, 4:21:09 AM4/1/24
to Google Ads API and AdWords API Forum
I am having the same issue and so I had to handle the detection of the partial failures uploads differently than what the Partial Failure docs recommend.

Here is the bug report from 2022 for this issue which is still open: https://github.com/googleads/google-ads-dotnet/issues/473

Google Ads API Forum Advisor

unread,
Apr 1, 2024, 9:39:19 PM4/1/24
to dave...@gmail.com, adwor...@googlegroups.com
Hi,

In order to debug your issue further, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end to better assist you on this request. 


If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can share the requested details via Reply privately to the author option or a direct private reply to this email.
 
Reply all
Reply to author
Forward
0 new messages