mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix: expose serper response code
This commit is contained in:
parent
8df4df5b0a
commit
662fa9819e
@ -15,6 +15,10 @@ export async function serperSearch(query: string): Promise<{ response: SerperSea
|
||||
timeout: 10000
|
||||
});
|
||||
|
||||
if (response.status !== 200) {
|
||||
throw new Error(`Serper search failed: ${response.status} ${response.statusText}`)
|
||||
}
|
||||
|
||||
// Maintain the same return structure as the original code
|
||||
return { response: response.data };
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user