Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google::Ads::GoogleAds::GoogleAdsClient#service.feed_item.mutate_feed_items returns error for unused field FIELD_CANNOT_BE_CLEARED #181

Open
sugilog opened this issue Aug 7, 2019 · 0 comments
Labels
bug Something isn't working difficulty: medium Intermediate difficulty; some experience with codebase may be helpful

Comments

@sugilog
Copy link

sugilog commented Aug 7, 2019

Hi,

Now I try to rewrite my API call to feed and feed_item operation from Adwords API to Google Ads API.
I have a problem when I call mutate_feed_items for DYNAMIC_CUSTOM feed, and it seems to be a bug.

My code like the following, ...

# client = Google::Ads::Googleds::GoogleAdsClient instance
# original_feed_item = generate via client.resource.feed_item, attributes from API query result.

operations = []

operation = client.operation.update_resource.feed_item(original_feed_item) do |modify_feed_item|
  ...
  # set values to update
end

if !opearation.update_mask.empty?
  operations << operation
end

if !operations.empty?
  client.service.feed_item.mutate_feed_items(MY_CUSTOMER_ID, operations)
end

then it raise error Google::Gax::InvalidArgumentError, and logged.

I, [2019-08-07T14:47:16.960735 #76554]  INFO -- : Incoming response (errors):
Error 1: {"errorCode":{"fieldError":"FIELD_CANNOT_BE_CLEARED"},"message":"The field cannot be cleared.","location":{"fieldPathElements":[{"fieldName":"operations","index":},{"fieldName":"update"},{"fieldName":"attribute_values"},{"fieldName":"boolean_value"}]}}
...

feed_item for DYNAMIC_CUSTOM has no field of type boolean, so it seems to be a bug.

@mcloonan mcloonan added bug Something isn't working difficulty: medium Intermediate difficulty; some experience with codebase may be helpful labels Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working difficulty: medium Intermediate difficulty; some experience with codebase may be helpful
Projects
None yet
Development

No branches or pull requests

2 participants