Skip to content

An AI-powered search engine with a generative UI

fix(fetch): use generic error messages instead of specific API names

Yoshiki Miura0e732fb7b3e7
diff --git a/lib/tools/fetch.ts b/lib/tools/fetch.ts
index 46fbca0f..7e781833 100644
--- a/lib/tools/fetch.ts
+++ b/lib/tools/fetch.ts
@@ -132,7 +132,7 @@ async function fetchTavilyExtractData(url: string): Promise<SearchResultsType> {
})
const json = await response.json()
if (!json.results || json.results.length === 0) {
- throw new Error('No results returned from Tavily Extract API')
+ throw new Error('No results returned from content extraction service')
}
const result = json.results[0]
@@ -153,7 +153,7 @@ async function fetchTavilyExtractData(url: string): Promise<SearchResultsType> {
console.error('API Error:', error)
throw error instanceof Error
? error
- : new Error('Tavily Extract API failed')
+ : new Error('Content extraction service failed')
}
}