mirror of
https://github.com/dzhng/deep-research.git
synced 2025-12-26 04:48:06 +08:00
feat: add timeout error handling for deep research query processing
- Enhanced error logging in deepResearch to detect and log timeout errors specifically. - Returns empty learnings and URLs on timeout or other errors, allowing graceful recovery.
This commit is contained in:
parent
6289c740a8
commit
59a8a977cb
@ -207,8 +207,15 @@ export async function deepResearch({
|
||||
visitedUrls: allUrls,
|
||||
};
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(`Error running query: ${serpQuery.query}: `, e);
|
||||
} catch (e: any) {
|
||||
if (e.message && e.message.includes('Timeout')) {
|
||||
console.error(
|
||||
`Timeout error running query: ${serpQuery.query}: `,
|
||||
e,
|
||||
);
|
||||
} else {
|
||||
console.error(`Error running query: ${serpQuery.query}: `, e);
|
||||
}
|
||||
return {
|
||||
learnings: [],
|
||||
visitedUrls: [],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user