validate_only doesn't throw exceptions

71 views
Skip to first unread message

Дмитро Булах

unread,
Mar 17, 2021, 4:07:38 AM3/17/21
to AdWords API and Google Ads API Forum
Hi there,
I got a problem with using `validateOnly` header.
when set to `True` I got no exceptions for malformed mutate operations.

Is there any other working approach for validating operations?

Google Ads API Forum Advisor Prod

unread,
Mar 17, 2021, 10:33:59 PM3/17/21
to post...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out.

Could you confirm if you are testing an error scenario? I asked because using validateOnly will only return errors if there were indeed errors in your request :

"If no errors are found, an empty response is returned. If validation fails, error messages indicate the failure points."

If you continue to observe issues, you may provide your customer ID, and the complete SOAP request (and response, if available) log, so our team can investigate further. You may send these details using the Reply privately to author option.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2DwIDN:ref

Дмитро Булах

unread,
Mar 18, 2021, 8:55:45 AM3/18/21
to AdWords API and Google Ads API Forum

Thanks Peter,

Here's one of my sample mutate operations:
(I'm using python SDK and Test account)

adgroupOperations = [
  {
    'operator': 'SET',
    'operand': {
      'id': 114550458410,
      'biddingStrategyConfiguration': { 'targetRoasOverride': 1.0 }
    }
  },
  {
    'operator': 'SET',
    'operand': {
      'id': 'nosuchgroup',
      'status': 'OTHER',
      'biddingStrategyConfiguration': { 'targetRoasOverride': 'malformed' }
    }
  },
]
client.SetClientCustomerId(CUSTOMER_SERVICE_ID)
client.validate_only=True
adgroup_service = client.GetService('AdGroupService', version='v201809')

response = adgroup_service.mutate([adgroupOperations])

the second element in the adgroupOperations list is malformed and at least I expect to get EntityNotFound.INVALID_ID error but I get None response.
Could Test account be a reason for that?

Google Ads API Forum Advisor Prod

unread,
Mar 18, 2021, 4:11:43 PM3/18/21
to post...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out. Please give it a try to enable logging for the python client library.

Thanks and regards,
Xiaoming, Google Ads API Team


Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q2DwIDN:ref
Reply all
Reply to author
Forward
0 new messages