Getting 500 Internal error when adding price extension to customer

127 views
Skip to first unread message

Nadezhda Yakuba

unread,
Nov 12, 2020, 7:12:06 AM11/12/20
to AdWords API and Google Ads API Forum
google-ads library for python

So, I successfully create price extension via google ads api v4 (we are planning to upgrade to version 6, but for now I have to cope with v4)
Request for creating price extension looks like this:

customer_id: "3084105835"
operations {
  create {
    price_feed_item {
      type: BRANDS
      language_code {
        value: "en"
      }
      price_offerings {
        header {
          value: "Some header 1"
        }
        description {
          value: "Some description 1"
        }
        price {
          currency_code {
            value: "RUB"
          }
          amount_micros {
            value: 10000
          }
        }
        unit: PER_YEAR
        final_urls {
          value: "https://www.google.com"
        }
      }
      price_offerings {
        header {
          value: "Some header 2"
        }
        description {
          value: "Some description 2"
        }
        price {
          currency_code {
            value: "RUB"
          }
          amount_micros {
            value: 10000
          }
        }
        unit: PER_YEAR
        final_urls {
          value: "https://www.google.com"
        }
      }
      price_offerings {
        header {
          value: "Some header 3"
        }
        description {
          value: "Some description 3"
        }
        price {
          currency_code {
            value: "RUB"
          }
          amount_micros {
            value: 10000
          }
        }
        unit: PER_YEAR
        final_urls {
          value: "https://www.google.com"
        }
      }
    }
    extension_type: PRICE
  }
}

The created item reference: "'customers/3084105835/extensionFeedItems/146825616700'"

Then I try to create customer extension setting with this price extension via CustomerExtensionSettingService, and I get a 500 Internal server error

Request looks like this:

customer_id: "3084105835"
operations {
  create {
    resource_name: "customers/3084105835/customerExtensionSettings/PRICE"
    extension_type: PRICE
    extension_feed_items {
      value: "customers/3084105835/extensionFeedItems/146825616700"
    }
    device: DESKTOP
  }
}

And I am getting "google.api_core.exceptions.InternalServerError: 500 Internal error encountered"

What am I doing wrong?

Google Ads API Forum Advisor Prod

unread,
Nov 13, 2020, 1:59:29 AM11/13/20
to kyky...@gmail.com, adwor...@googlegroups.com
Hi Nadezhda,

Thanks for posting your concern.

The Internal error occurs when something unexpected happened while processing the request or due to a bug. However, retrying the API request will fix this error. Also, since you are using v4, which already deprecated based on Deprecation Schedule guide, then I would suggest migrating to v6. You may follow this guide to migrate to the latest API version.

If the issue persists, could you provide the customer ID and the complete request and response logs, including the request ID, that was generated on your end so our team can investigate?

You may refer to the links provided below to enable the logging of your client library:
Java - https://developers.google.com/google-ads/api/docs/client-libs/java/logging
.NET - https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging
PHP - https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging
Python - https://developers.google.com/google-ads/api/docs/client-libs/python/logging
Ruby - https://developers.google.com/google-ads/api/docs/client-libs/ruby/logging
Perl - https://developers.google.com/google-ads/api/docs/client-libs/perl/logging

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q27tIKC:ref

Google Ads API Forum Advisor Prod

unread,
Nov 13, 2020, 2:26:33 AM11/13/20
to kyky...@gmail.com, adwor...@googlegroups.com
Hi Nadezhda,

Thanks for posting your concern.

The Internal error occurs when something unexpected happened while processing the request or due to a bug. However, retrying the API request will fix this error. Also, since you are using v4, which already deprecated based on Deprecation Schedule guide, then I would suggest migrating to v6. You may follow this guide to migrate to the latest API version.

If the issue persists, could you provide the customer ID and the complete request and response logs, including the request ID, that was generated on your end so our team can investigate?

You may refer to the links provided below to enable the logging of your client library:
Java - https://developers.google.com/google-ads/api/docs/client-libs/java/logging
.NET - https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging

Nadezhda Yakuba

unread,
Nov 16, 2020, 11:05:05 AM11/16/20
to AdWords API and Google Ads API Forum
Hello there,
So, we upgraded to v6 (google-ads 8.0.0,  python lib) and, unfortunately, the problem is still here

customer id: 3084105835

Method: /google.ads.googleads.v6.services.CustomerExtensionSettingService/MutateCustomerExtensionSettings
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "8735817521",
  "x-goog-api-client": "gl-python/3.8.1 grpc/1.33.2 gax/1.17.0 gapic/8.0.0",
  "x-goog-request-params": "customer_id=3084105835"
}
Request: customer_id: "3084105835"
operations {
  create {
    resource_name: "customers/3084105835/customerExtensionSettings/PRICE"
    extension_type: PRICE
    device: DESKTOP
    extension_feed_items: "customers/3084105835/extensionFeedItems/147452393590"
  }
}
Response
-------
Headers: {
  "request-id": "dSeR-DyWK20kH_MGQ92DSg"
}
Fault: {
  "created": "@1605542367.791811499",
  "description": "Error received from peer ipv4:209.85.233.95:443",
  "file": "src/core/lib/surface/call.cc",
  "file_line": 1062,
  "grpc_message": "Internal error encountered.",
  "grpc_status": 13
}
[2020-11-16 15:59:27,811 - WARNING] Request made: ClientCustomerId: 3084105835, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v6.services.CustomerExtensionSettingService/MutateCustomerExtensionSettings, RequestId: dSeR-DyWK20kH_MGQ92DSg, IsFault: True, FaultMessage: Internal error encountered.

Google Ads API Forum Advisor Prod

unread,
Nov 17, 2020, 1:59:00 AM11/17/20
to kyky...@gmail.com, adwor...@googlegroups.com
Hi Nadezhda,

Thank you for providing these details.

We'll discuss this with the rest of our team and get back to you once we have updates.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q27tIKC:ref

Nadezhda Yakuba

unread,
Nov 20, 2020, 3:47:48 AM11/20/20
to AdWords API and Google Ads API Forum
Hi Peter,
Are there by any chance any updates yet?

Best regards,
Nadezhda

Google Ads API Forum Advisor Prod

unread,
Nov 20, 2020, 8:45:26 AM11/20/20
to kyky...@gmail.com, adwor...@googlegroups.com
Hello,

No updates yet. I'm keeping an eye on the investigation and I will let you know as soon as I have any information to share.

Regards,
Mike, Google Ads API Team

ref:_00D1U1174p._5004Q27tIKC:ref

Nadezhda Yakuba

unread,
Dec 1, 2020, 5:44:37 AM12/1/20
to AdWords API and Google Ads API Forum
Hi,
Are there any updates yet?

Best regards, 
Nadezhda

Google Ads API Forum Advisor Prod

unread,
Dec 1, 2020, 8:33:34 AM12/1/20
to kyky...@gmail.com, adwor...@googlegroups.com
Hello,

Unfortunately, I still don't have anything to share. I'm following up with the team to try to get to the bottom of this, and I will let you know as soon as I do learn anything.

Google Ads API Forum Advisor Prod

unread,
Dec 2, 2020, 2:12:39 PM12/2/20
to kyky...@gmail.com, adwor...@googlegroups.com
Hello,

It looks like the root cause of this issue is that you're specifying the resource name of the entity you're creating in the request as you're creating it. The resource name, however, is a unique identifier created by the API. Try not specifying a resource name on your create request and it should go through fine.

We are investigating ways to ensure that the API handles this case better, perhaps by ignoring it or by producing a more reasonable error. For now, if you get 500 errors, please double-check this case first.
Reply all
Reply to author
Forward
0 new messages