You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue carries over the enhancement made for #1725 to follow up on the remaining places that could be enhanced consistently.
Context
Previously, #1258 has pointed out the way to unify GLA error messages for ApiException errors thrown from Google Ads APIs. In Google Shopping Content library, a thrown exception instance may be Google\Exception or Google\Service\Exception. The former simply extends Exception without adding anything.
In #2007, the handler for Google\Service\Exception has been added. It also adjusted the errors that may occur when connecting to a Google Merchant Center account. #2012 followed the same direction as #2007 to adjust the error handling for site verification methods.
Classes and methods related to Google Shipping Content library
Only listing the remaining ones
src/API/Google/Merchant.php
claimwebsite
get_accountstatus
has_access
src/API/Google/MerchantReport.php
get_report_data
Technical
There is another possible enhancement related to these changes. To create an ExceptionWithResponseData, the current code snippets are repeated many times. After evaluating the feasibility of de-duplicating these code snippets, the needed changes might be done together.
This issue carries over the enhancement made for #1725 to follow up on the remaining places that could be enhanced consistently.
Context
Previously, #1258 has pointed out the way to unify GLA error messages for
ApiException
errors thrown from Google Ads APIs. In Google Shopping Content library, a thrown exception instance may beGoogle\Exception
orGoogle\Service\Exception
. The former simply extendsException
without adding anything.In #2007, the handler for
Google\Service\Exception
has been added. It also adjusted the errors that may occur when connecting to a Google Merchant Center account. #2012 followed the same direction as #2007 to adjust the error handling for site verification methods.Classes and methods related to Google Shipping Content library
Only listing the remaining ones
src/API/Google/Merchant.php
claimwebsite
get_accountstatus
has_access
src/API/Google/MerchantReport.php
get_report_data
Technical
There is another possible enhancement related to these changes. To create an
ExceptionWithResponseData
, the current code snippets are repeated many times. After evaluating the feasibility of de-duplicating these code snippets, the needed changes might be done together.Example in
ApiException
catchergoogle-listings-and-ads/src/API/Google/AdsCampaign.php
Lines 129 to 136 in 38b94ec
Example in
Google\Exception
orGoogle\Service\Exception
catchergoogle-listings-and-ads/src/API/Google/Merchant.php
Lines 193 to 201 in 38b94ec
The text was updated successfully, but these errors were encountered: