Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

fix: replace .single() with .maybeSingle() in SupabaseDB.get() to handle missing rows (#4599)

Saharsh Patel713dba5d0a5b
diff --git a/mem0-ts/src/oss/src/vector_stores/supabase.ts b/mem0-ts/src/oss/src/vector_stores/supabase.ts
index 9702c3946..43db08486 100644
--- a/mem0-ts/src/oss/src/vector_stores/supabase.ts
+++ b/mem0-ts/src/oss/src/vector_stores/supabase.ts
@@ -267,7 +267,7 @@ See the SQL migration instructions in the code comments.`,
.from(this.tableName)
.select("*")
.eq("id", vectorId)
- .single();
+ .maybeSingle();
if (error) throw error;
if (!data) return null;