mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 15:39:06 +08:00
fix: expose serper response code
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user