n8n-io/n8n · error · NodeOperationError
Table ${tableName} not found
Error message
Table ${tableName} not found What it means
Thrown by the Supabase vector store populate path when SupabaseVectorStore.fromDocuments rejects with the exact message 'Error inserting: undefined 404 Not Found'. n8n string-matches that message to detect a missing table; any other rejection is rethrown as a generic NodeOperationError.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.ts:102
async populateVectorStore(context, embeddings, documents, itemIndex) {
const tableName = context.getNodeParameter('tableName', itemIndex, '', {
extractValue: true,
}) as string;
const options = context.getNodeParameter('options', itemIndex, {}) as {
queryName: string;
};
const credentials = await context.getCredentials('supabaseApi');
const client = createClient(credentials.host as string, credentials.serviceRole as string);
try {
await SupabaseVectorStore.fromDocuments(documents, embeddings, {
client,
tableName,
queryName: options.queryName ?? 'match_documents',
});
} catch (error) {
if ((error as Error).message === 'Error inserting: undefined 404 Not Found') {
throw new NodeOperationError(context.getNode(), `Table ${tableName} not found`, {
itemIndex,
description: 'Please check that the table exists in your vector store',
});
} else {
throw new NodeOperationError(context.getNode(), error as Error, {
itemIndex,
});
}
}
},
}) {}
View on GitHub (pinned to 5ac6606e81)
Solutions
- Run the Supabase pgvector setup SQL in the target project to create the table and the match_documents (or configured queryName) function.
- Confirm the node's tableName matches the created table exactly.
- Verify the serviceRole key and host point at the same Supabase project where the table was created.
- If RLS is on, ensure the service-role key bypasses RLS or that a policy permits inserts.
- Note: the matcher is brittle — if Supabase changes the error wording this branch is skipped and you get the generic rethrow; rely on the table existing, not on this message.
Example fix
// before: tableName = 'docuements' (typo) -> 404 // after: tableName = 'documents' and ensure the table exists: // create table documents (id uuid primary key, content text, metadata jsonb, embedding vector(1536));
Defensive patterns
Strategy: validation
Validate before calling
// verify the table is reachable via PostgREST before populating
const res = await this.helpers.requestWithAuthentication.call(this, 'supabaseApi', {
method: 'GET', uri: `${credentials.host}/rest/v1/${tableName}?limit=0`, json: true,
});
// a 404 here means the table is missing — create it before fromDocuments. Type guard
function isTableName(name: unknown): name is string { return typeof name === 'string' && /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(name); } Try / catch
try { await SupabaseVectorStore.fromDocuments(...) } catch (e) { if (/404 Not Found/.test(e.message)) await ensureSupabaseTable(); else throw e; } Prevention
- Run the pgvector setup SQL in every Supabase project as part of provisioning.
- Do not rely on the exact '404 Not Found' string — validate table existence explicitly.
- Keep tableName in a shared variable used by both setup and runtime.
- Confirm serviceRole key + host point at the same project where the table was created.
When it happens
Trigger: populateVectorStore with a tableName that does not exist (or is not visible) in the Supabase project, so the PostgREST insert returns 404 and the langchain client surfaces the canned 'Error inserting: undefined 404 Not Found' text.
Common situations: The pgvector setup SQL (table + match_documents function) was never run in the target Supabase project; tableName typo; pointing at the wrong Supabase project/host; the table exists in a different schema; RLS blocks anonymous/service-role access so PostgREST reports 404.
Related errors
- Supabase upsert failed: ${error.message}
- Supabase query failed: ${error.message}
- Supabase delete failed: ${error.message}
- Filter operator "${operator}" on key "${key}" requires a non
- Index ${indexField} not found
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/770dd10dc0c51052.
Report an issue: GitHub.