Query Tool / Knowledge Base Broken – JSON Parse Er...
# support
m
Hey team, we’re seeing a consistent failure with the query_tool on Vapi when querying the Knowledge Base. Tool response fails with:
Unexpected token '<', "<!DOCTYPE "... is not valid JSON
These same KB files were working earlier and I’ve seen other people post on this in the last couple days and while folks from the team have mentioned this is solved, we’re still running into this.
v
Action Step: Check your Call Logs in the Vapi dashboard to pinpoint the exact error and see the tool execution details. - Go to
Observe > Call Logs
in your dashboard - Look for entries related to your query tool and review the response payloads for HTML or error messages This will help you confirm if the backend is returning an HTML error page instead of the expected JSON, which is the most common cause of the
Unexpected token '<'
error. If you see an HTML response, it's likely a server-side issue and you should contact Vapi support with the call log details for further assistance. Source: - [Custom tools troubleshooting](https://docs.vapi.ai/tools/custom-tools-troubleshooting)
c
Hi, This is due to the same ongoing Google/Gemini provider issue. The Knowledge Base query relies on Gemini infrastructure, and during this incident Gemini is intermittently returning HTML error pages instead of JSON, which causes the KB lookup to fail with:
Copy code
Unexpected token '<', '<!DOCTYPE' is not valid JSON
You can track the incident and updates here: [https://status.vapi.ai/incident/809181](https://status.vapi.ai/incident/809181)