GraphQL API source troubleshooting

In this article

This page provides tools and information on how to troubleshoot issues with the GraphQL API source.

API call is unsuccessful

Your GraphQL API source makes API calls to retrieve the application content. If an API call is unsuccessful, the content is not indexed, and the source logs the error in the Log Browser (platform-ca | platform-eu | platform-au).

Symptoms:

  • Coveo fails to index some or all of the desired content. Items or metadata might be missing.

  • Logs show error codes such as 401 or 403, which indicate that the API call was unsuccessful.

  • The error message is not detailed enough to understand the cause of the issue.

To further investigate this issue, you can enable the logging of response headers in the source logs when a call is unsuccessful.

Important

Depending on the API, response headers may contain sensitive data that will appear in logs and therefore be exposed.

Coveo automatically removes the Set-Cookie headers before logging, but custom headers may contain additional sensitive information.

We highly recommend you ensure that the response headers don’t contain any sensitive data before logging them.

To log the response headers when an API call is unsuccessful

  1. On the Sources (platform-ca | platform-eu | platform-au) page, select your GraphQL API source, and then click Edit configuration with JSON in the More menu.

  2. In the source JSON configuration, add "LogResponseHeadersWhenUnsuccessful": {"value": "true"} to the parameters object.

  3. Save your changes.

  4. Rebuild your source.

During the rebuild, Coveo will log the response headers of any unsuccessful call in the Log Browser (platform-ca | platform-eu | platform-au).