Hi,
we've encountered a peculiar case where removing and adding the same criterion in a batch job reproducibly causes an UNEXPECTED_INTERNAL_API_ERROR to occur.
For some background, we have a housekeeping script in use that reads a rather large list of Youtube Channels from a spreadsheet and configures these channels as account level negatives in all of our Ads accounts. This is using the Adwords API.
When one of these channels get removed from Youtube, the following happens:
- Our syncing logic checks the account's existing YT Channel exclusion criteria
- The removed channel is still existing, but has its channel ID and channel name set to null
- As we know that this criterion refers to a removed YT channel, we mark it for removal
- But at the same time, the YT Channel is still present in the source spreadsheet, so we mark the channel as needing to be added to the account
- Both entries actually refer to the same YT channel, but we cannot check for that because the channel ID has been removed from the existing criterion
- We set up a batch job that contains two operations, one to remove the existing criterion and one to create a new one
- That batch job fails with an UNEXPECTED_INTERNAL_API_ERROR
I'm wondering how we can better handle this. The crux really lies in the fact that once a YT channel is deleted, the corresponding criterion on the Ads side no longer is identifiable because its channelId and channelName fields are both null. Any thoughts?