{"record":{"id":"23a7723a3dad6c92","repo":"FlowiseAI/Flowise","slug":"e-23a772","errorCode":null,"errorMessage":"${e}","messagePattern":"\\$\\{e\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/vectorstores/Supabase/Supabase.ts","lineNumber":174,"sourceCode":"                        recordManager,\n                        vectorStore,\n                        options: {\n                            cleanup: recordManager?.cleanup,\n                            sourceIdKey: recordManager?.sourceIdKey ?? 'source',\n                            vectorStoreName: tableName + '_' + queryName\n                        }\n                    })\n                    return res\n                } else {\n                    await SupabaseUpsertVectorStore.fromDocuments(finalDocs, embeddings, {\n                        client,\n                        tableName: tableName,\n                        queryName: queryName\n                    })\n                    return { numAdded: finalDocs.length, addedDocs: finalDocs }\n                }\n            } catch (e) {\n                throw new Error(e)\n            }\n        },\n        async delete(nodeData: INodeData, ids: string[], options: ICommonObject): Promise<void> {\n            const supabaseProjUrl = nodeData.inputs?.supabaseProjUrl as string\n            const tableName = nodeData.inputs?.tableName as string\n            const queryName = nodeData.inputs?.queryName as string\n            const embeddings = nodeData.inputs?.embeddings as Embeddings\n            const recordManager = nodeData.inputs?.recordManager\n\n            const credentialData = await getCredentialData(nodeData.credential ?? '', options)\n            const supabaseApiKey = getCredentialParam('supabaseApiKey', credentialData, nodeData)\n\n            const client = createClient(supabaseProjUrl, supabaseApiKey)\n\n            const supabaseStore = new SupabaseVectorStore(embeddings, {\n                client,\n                tableName: tableName,\n                queryName: queryName","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/vectorstores/Supabase/Supabase.ts#L156-L192","documentation":"Supabase's `add` path wraps failures from `SupabaseUpsertVectorStore.fromDocuments` / upsert into `new Error(e)`. When a recordManager is supplied it goes through index/upsert with cleanup; otherwise `fromDocuments`. The re-wrap discards the original stack. Underlying causes are Supabase project URL/keys, RLS policies, RPC function missing, or embedding dimension mismatch.","triggerScenarios":"Invalid `supabaseProjUrl`/`supabaseApiKey`; Row-Level Security blocking insert; the match query RPC (`queryName`) does not exist; vector dimension mismatch with the table column; network/region outage on the Supabase project.","commonSituations":"Service role key swapped for anon key (RLS blocks writes); table or RPC not provisioned; embedding model changed dimension; project paused on free tier.","solutions":["Use the service role key for server-side ingestion (bypasses RLS) and confirm the project URL.","Provision the table and the match RPC (`queryName`) per the pgvector + Supabase guide.","Ensure the embedding column dimension matches the model output.","Temporarily test an insert directly via the Supabase client to surface the real error."],"exampleFix":"// before\ncatch (e) { throw new Error(e) }\n\n// after\ncatch (e) { throw new Error(`Supabase add failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e }) }","handlingStrategy":"try-catch","validationCode":"function validateSupabaseAddInputs(inputs: any, creds: any) {\n  if (!inputs?.supabaseProjUrl) throw new Error('supabaseProjUrl is required')\n  if (!creds?.supabaseApiKey) throw new Error('supabaseApiKey is required')\n  if (!inputs?.tableName) throw new Error('tableName is required')\n}","typeGuard":"null","tryCatchPattern":"try { await ingest() } catch (e) { throw new Error(`Supabase ingest failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e }) }","preventionTips":["Use the service role key server-side to bypass RLS.","Provision the table and match RPC via the pgvector migration.","Keep embedding dimension == vector column dimension.","Preserve original error with `cause`."],"tags":["supabase","vectorstore","error-wrapping","rls","network","typescript"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}