Catching Exceptions

14 views
Skip to first unread message

Anton Swartz

unread,
May 17, 2022, 11:36:16 AM5/17/22
to Google Ads API and AdWords API Forum
Is there a way to make the php library not catch exceptions and pass them to the application calling the client? I'm having a hard time using this library with our client customers since every other time it has an expired token or invalid issue it exits the script and causes me errors. Some are guzzle errors and some are google catching exceptions and exiting on their own.

Anton Swartz

unread,
May 17, 2022, 11:41:10 AM5/17/22
to Google Ads API and AdWords API Forum
For example when connecting to a customer's account, i recieve this:

Request with ID 'hjCy3cXHtU4xSwgGNP0GsQ' has failed.
Google Ads failure details:
    authorization_error: The customer (or login customer) isn't in Google Ads. It belongs to another ads system.

However it immediately exits the script and i have no recourse for catching it, or handling any data or errors.

Google Ads API Forum Advisor

unread,
May 18, 2022, 6:39:13 AM5/18/22
to djnec...@gmail.com, adwor...@googlegroups.com
Hi Anton,

Moving forward to your concern, I noticed that this is more related to the client library. That said, I would suggest reaching out to the PHP client library owner by posting your concern via this Issue Tab in Github as they are more equipped to provide guidance to this concern.

Regards,
Google Logo
Carmela
Google Ads API Team
 


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