Unexpected ApiError.fieldPathElements result (Perl v201702)

99 views
Skip to first unread message

Phillip Pegelow

unread,
May 3, 2017, 2:07:20 PM5/3/17
to AdWords API Forum

The newest Perl library, v4.13.0 v201702, introduced the "fieldPathElements" field of ApiError.  In testing prior to this upgrade, I have noticed that the first fieldPathElements.operations index is always 0 and the second fieldPathElements.operations index is the expected index of the failed job's error.

Dumped ApiError.EntityNotFound xml object: 
<fieldPath>operations[20].operand.campaignId</fieldPath>
<fieldPathElements>
 
<field>operations</field>
   
<index>0</index>
</fieldPathElements>
<fieldPathElements>
 
<field>operations</field>
 
<index>20</index>
</fieldPathElements>
<fieldPathElements>
 
<field>operand</field>
</fieldPathElements>
<fieldPathElements>
 
<field>campaignId</field>
</fieldPathElements>
<trigger>CampaignId: 111222333</trigger>
<errorString>EntityNotFound.INVALID_ID</errorString>
<ApiError.Type>EntityNotFound</ApiError.Type>
<reason>INVALID_ID</reason>


Is this behavior expected or is this a bug?  If it is expected, should we always handle these errors by parsing the second "operations" attribute?

We can also handle this appropriately by just parsing index from the fieldPath string, but according to the release notes (https://developers.google.com/adwords/api/docs/reference/#getquery) we should be using the fieldPathElements instead.

Josh Radcliff (AdWords API Team)

unread,
May 3, 2017, 5:50:18 PM5/3/17
to AdWords API Forum
Hi,

Are you only seeing this issue with specific services, or only when using BatchJobService? I ask because I just ran a few tests with AdGroupCriterionService and AdGroupService, and the fieldPathElements were returned as expected (e.g., the first element's index reflected the proper value).

Thanks,
Josh, AdWords API Team

Phillip Pegelow

unread,
May 4, 2017, 10:05:00 AM5/4/17
to AdWords API Forum
Thank you for the reply, Josh,

Yes, this does appear to be unique to the BatchJobService. I have not experienced this behavior elsewhere.

Josh Radcliff (AdWords API Team)

unread,
May 4, 2017, 3:53:58 PM5/4/17
to AdWords API Forum
Hi,

Thanks for confirming. I tried this out as well and confirmed that there is an extra fieldPathElement in errors from BatchJobService, but not in errors from the synchronous services. I've asked the batch job team to investigate and will post back here as soon as I have an update from them.

Thanks,
Josh, AdWords API Team

Phillip Pegelow

unread,
May 8, 2017, 10:14:52 AM5/8/17
to AdWords API Forum
Any update on this?

Thanks,
Phil

Josh Radcliff (AdWords API Team)

unread,
May 8, 2017, 1:52:21 PM5/8/17
to AdWords API Forum
Hi Phil,

We're actively working on a fix for this. I'll update this post as soon as it's in place.

Thanks,
Josh, AdWords API Team

Christian

unread,
May 13, 2017, 4:52:54 PM5/13/17
to AdWords API Forum
Hi,

we also started to see strange error responses in the BatchJobService. We use the googleads Python library. Here is an example error:

{
  u
'errorString': u'EntityNotFound.INVALID_ID',
  u
'fieldPath': u'operations[18342].operand.criterion',
  u
'reason': u'INVALID_ID',
  u
'trigger': u'No existing bid modifier for AdGroupId: 12345 CriterionId{id=30002}',
  u
'ApiError.Type': u'EntityNotFound',
  u
'fieldPathElements': [
   
{u'field': u'operations', u'index': u'1'},
   
{u'field': u'operations', u'index': u'10'},
   
{u'field': u'operand'},
   
{u'field': u'criterion'}
 
]
}

Three things are problematic here:

- There are 2 indexes for operations in fieldPathElements (1 and 10).
- These indexes do not match the index in fieldPath (18342)
- The ad group and criterion ID mentioned in trigger do not match the IDs of the original operations in the batch job at that index.

Is this a related problem or an entirely different issue?

Best,
Christian

Josh Radcliff (AdWords API Team)

unread,
May 15, 2017, 8:10:24 AM5/15/17
to AdWords API Forum
Hi Christian,

That looks like it may be a separate issue. Could you send me the batch job ID for the job you mentioned below so I can confirm?

Thanks,
Josh, AdWords API Team

Josh Radcliff (AdWords API Team)

unread,
May 15, 2017, 8:07:46 PM5/15/17
to AdWords API Forum
Hi Christian,

Thanks for sending over the batch job ID. After taking a closer look at the operations and results for that job, I suspect that this is related to the same issue you raised earlier after all. I suggest we wait for the fix for that one (should be soon), then see if that resolves both problems.

Cheers,
Josh, AdWords API Team

Josh Radcliff (AdWords API Team)

unread,
May 16, 2017, 7:54:02 PM5/16/17
to AdWords API Forum
Hi Christian,

The fix for this issue is now in place. Could you retry your batch jobs and let me know if you still see either issue?

Thanks,
Josh, AdWords API Team

Christian

unread,
May 17, 2017, 6:17:10 AM5/17/17
to AdWords API Forum
Hi Josh,

thanks for the fix. The index numbers in fieldPath and fieldPathElements now look correct.

The other issue ("ad group and criterion ID mentioned in trigger do not match the IDs of the original operations in the batch job at that index") still exists. But let me first check if this possibly is a problem on our side.

Best,
Christian

Phillip Pegelow

unread,
May 17, 2017, 1:47:17 PM5/17/17
to AdWords API Forum
Josh,

The tests that were previously failing are now passing and the fieldpathelements of the error objects are as we would expect.

Thank you very much for your help,
Phil

Josh Radcliff (AdWords API Team)

unread,
May 17, 2017, 7:30:48 PM5/17/17
to AdWords API Forum
Hi Phil,

Thanks for confirming. Glad to hear things are behaving as expected now.

Cheers,
Josh, AdWords API Team

Christian

unread,
May 18, 2017, 4:12:47 AM5/18/17
to AdWords API Forum
Hi Josh,

the other issue I mentioned appears to be a problem on our side. So everything is fine on the API side.

Best,
Christian

Josh Radcliff (AdWords API Team)

unread,
May 18, 2017, 8:35:39 AM5/18/17
to AdWords API Forum
Hi Christian,

Thanks for the update. If you encounter a separate issue please open a new topic and we'll be happy to help.

Cheers,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages