Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(ui): surface search API errors to AI for graceful responses

Louis Beaumonte5742061fac3
diff --git a/screenpipe-app-tauri/components/global-chat.tsx b/screenpipe-app-tauri/components/global-chat.tsx
index d700b0ed3..22562100d 100644
--- a/screenpipe-app-tauri/components/global-chat.tsx
+++ b/screenpipe-app-tauri/components/global-chat.tsx
@@ -799,6 +799,12 @@ export function GlobalChat() {
if (!response.ok) throw new Error(`Search failed: ${response.status}`);
const data = await response.json();
+
+ // Check for API error response
+ if (data.error) {
+ return `Search failed: ${data.error}. Please inform the user about this error and suggest they restart Screenpipe or check logs.`;
+ }
+
const searchResults = data.data || [];
const pagination = data.pagination || {};