Hi,
If your request contains errors at operation index 0 and operation index 2,
then the response will return both errors. In addition, in logs you'll see
an *index* value for the entry for operation 2 since that's not the default
value for an int. Here's an example I put together:
message: "Field \'ad_group\' is required for \'CREATE\' operation."
location {
field_path_elements {
field_name: "operations"
*index {*
* }*
}
field_path_elements {
field_name: "create"
}
field_path_elements {
field_name: "ad_group"
}
}
Error 1: error_code {
request_error: REQUIRED_FIELD_MISSING
}
message: "Field \'ad_group\' is required for \'CREATE\' operation."
location {
field_path_elements {
field_name: "operations"
*index {*
* value: 2*
* }*
}
field_path_elements {
field_name: "create"
}
field_path_elements {
field_name: "ad_group"
}
}
If you're using one of our client libraries, it should give you access to
the *GoogleAdsFailure* and the underlying *GoogleAdsErrors*. If you can't
find that in the library, please let me know which library you're using so
I can help out.
Thanks,
Josh, Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
On 04/25/19 10:17:48 [email protected] wrote:
Exception is fine as long as I have data to process.
I would say its the api's library to provide with proper data despite
buffer constraints.
I have not tested something though: what if entries at index 0 and 2 have
bad data? Would I get all errors (which I would like) or only the first
failing (which would be meaningless then)?
Thanks
On Thursday, April 25, 2019 at 4:11:28 PM UTC+2, googleadsapi-forumadvisor
wrote:
Hi,
I just realized that I may have misunderstood the issue with the error. Is
the problem you're highlighting that it's missing the operation index?
Error 1:
{"errorCode":{"mutateError":"RESOURCE_NOT_FOUND"},"message":"Resource
was not found.","trigger":{"stringValue":""},"location":{"fieldPathElements
":[{"fieldName":"operations","*index*":},{"fieldName":"update"},{"
fieldName":"resource_name"}]}}
If so, could you confirm that you see this problem *even if the operation
index is not 0*? Due to the way protocol buffers behave, you won't see a
value for a primitive field such as *index* if the value is the default for
that primitive type (zero, in this case).
Thanks,
Josh, Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
On 04/24/19 18:15:17 [email protected] wrote:
I’d say ok for the exception but then I would like to have meaningful
errors and their index.
If its only related to partial_failure, lets wait for the api to be
consolidated and less brittle.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/
msgid/adwords-api/5ae11c4c-9cd9-47b9-bfda-f995b3e58aa1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/acf5bea8-d472-4bd2-bb4a-f3cc0de4ef17%40googlegroups.com
<https://groups.google.com/d/msgid/adwords-api/acf5bea8-d472-4bd2-bb4a-f3cc0de4ef17%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/00d12j5d8o00000085n9hi000bfupey68mjce1p6so30c1g68r36e1h%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.