Debug API errors via API Diagnostics
The API Diagnostics tab lets you review your failed Content API requests in Google Merchant Center.
The API Diagnostics tool allows you to:
- View all the failed API requests for a given time period.
- Determine the total number of failed requests per API service & method.
- Review a sample request that caused the error.
With the API Diagnostics tab, you can analyse any affected requests and correct those that have similar errors. After fixing the errors, resubmit the API requests.
Use the Timeline to find failed data entries
The Timeline utility lets you find the failed data entries in the API requests uploaded within a given time period. The results that are displayed include the total number of failed requests across all services. You can also choose to view results for a specific service by using the services drop-down selector located in the top left-hand corner of the Timeline utility.
To view the failed API requests, follow these steps:
- Sign in to your Merchant Center account
- Select Content API under the 3-dot icon in the upper right-hand corner.
- Stay on the Diagnostics page to view failed data.
The API Diagnostics tool renders a stacked graph that displays the number of Failed API calls and Successful API calls for a specific time period. Utilised API services and methods are displayed in the Overview table with the corresponding number of API requests that failed for each service and method.
Note: The displayed timestamp on the graph is based on the time zone specified in your account settings.
View failed API requests
Once the Overview table displays the results for your selected data range, you can browse through the listed services and methods to quickly determine the causes of the failed API requests. By default, the errors are listed by descending number of instances for each service – click directly on the headers to change the sort order.
To view the failed requests, follow these steps:
- In the Number of failed API calls column of the Overview table, click the failed request value for a specific method to drill down through the errors and their respective sample snippets.
- Next, view the error in the sample code example, by clicking the Request snippet example and Response snippet example tabs.
Use the above error messages as guidelines for fixing your API requests.