Krishna Kumar Maurya
01/23/2026, 10:11 AMVapi Support Bot
01/23/2026, 10:12 AMjavascript
app.post('/kb/search', async (req, res) => {
try {
// Your search logic here
} catch (error) {
res.json({ documents: [], error: "Search temporarily unavailable" });
}
});
This will prevent HTML error pages and ensure your agent receives the expected JSON format.
For more details, see the [custom knowledge base documentation](https://docs.vapi.ai/knowledge-base/custom-knowledge-base).
Source:
- [Custom Knowledge Base Documentation](https://docs.vapi.ai/knowledge-base/custom-knowledge-base)Chiranjeet Mishra
01/23/2026, 7:25 PMUnexpected token '<', '<!DOCTYPE' is not valid JSON
You can track the incident and updates here:
https://status.vapi.ai/incident/809181Chiranjeet Mishra
01/23/2026, 7:37 PM