Add error handlers to Chroma sync operations to prevent worker crashes on timeout (#428)
* Initial plan * Add .catch() handlers to Chroma sync operations to prevent worker crashes Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com> * Add .catch() handler to syncUserPrompt to prevent crashes Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com> * Update mem-search plugin with new features and improvements --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com> Co-authored-by: Alex Newman <thedotmack@gmail.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -300,6 +300,12 @@ export class SDKAgent {
|
|||||||
type: obsType,
|
type: obsType,
|
||||||
title: obsTitle
|
title: obsTitle
|
||||||
});
|
});
|
||||||
|
}).catch((error) => {
|
||||||
|
logger.warn('CHROMA', 'Observation sync failed, continuing without vector search', {
|
||||||
|
obsId,
|
||||||
|
type: obsType,
|
||||||
|
title: obsTitle
|
||||||
|
}, error);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Broadcast to SSE clients (for web UI)
|
// Broadcast to SSE clients (for web UI)
|
||||||
@@ -367,6 +373,11 @@ export class SDKAgent {
|
|||||||
duration: `${chromaDuration}ms`,
|
duration: `${chromaDuration}ms`,
|
||||||
request: summaryRequest
|
request: summaryRequest
|
||||||
});
|
});
|
||||||
|
}).catch((error) => {
|
||||||
|
logger.warn('CHROMA', 'Summary sync failed, continuing without vector search', {
|
||||||
|
summaryId,
|
||||||
|
request: summaryRequest
|
||||||
|
}, error);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Broadcast to SSE clients (for web UI)
|
// Broadcast to SSE clients (for web UI)
|
||||||
|
|||||||
@@ -119,6 +119,11 @@ export class SessionRoutes extends BaseRouteHandler {
|
|||||||
duration: `${chromaDuration}ms`,
|
duration: `${chromaDuration}ms`,
|
||||||
prompt: truncatedPrompt
|
prompt: truncatedPrompt
|
||||||
});
|
});
|
||||||
|
}).catch((error) => {
|
||||||
|
logger.warn('CHROMA', 'User prompt sync failed, continuing without vector search', {
|
||||||
|
promptId: latestPrompt.id,
|
||||||
|
prompt: promptText.length > 60 ? promptText.substring(0, 60) + '...' : promptText
|
||||||
|
}, error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user