GraphQL API source troubleshooting
GraphQL API source troubleshooting
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.
-
Logs show messages such as
The page of items was empty for the offset…
orThe page of items was empty for the next page reference…
. -
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 the response body and/or headers in the source logs when a call is unsuccessful.
Depending on the API, the response body and/or headers may contain sensitive data that will appear in logs and therefore be exposed.
Coveo automatically removes the We highly recommend you ensure that the response body and/or headers don’t contain any sensitive data before logging them. |
To log the response body and/or headers when an API call is unsuccessful
-
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.
-
In the source JSON configuration, add
"LogResponseBodyWhenUnsuccessful": {"value": "true"}
and/or"LogResponseHeadersWhenUnsuccessful": {"value": "true"}
to theparameters
object. -
Save your changes.
During the rebuild, Coveo will log the response body and/or headers of any unsuccessful call in the Log Browser (platform-ca | platform-eu | platform-au).