n8n-io/n8n · error · NodeOperationError

${error.message}

Error message

${error.message}

What it means

The fallback rethrow in the Zep populate catch block: when the error is not the specific 400/CreateDocumentCollectionRequest shape, n8n wraps the raw error object as a NodeOperationError. The message echoes the underlying error via NodeOperationError(error).

Source

Thrown at packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.ts:148

			if (credentials.cloud) {
				await ZepCloudVectorStore.fromDocuments(documents, embeddings, zepConfig);
			} else {
				await ZepVectorStore.fromDocuments(documents, embeddings, {
					...zepConfig,
					apiUrl: credentials.apiUrl,
				});
			}
		} catch (error) {
			const errorCode = (error as IDataObject).code as number;
			const responseData = (error as IDataObject).responseData as string;
			if (errorCode === 400 && responseData.includes('CreateDocumentCollectionRequest')) {
				throw new NodeOperationError(context.getNode(), `Collection ${collectionName} not found`, {
					itemIndex,
					description:
						'Please check that the collection exists in your vector store, or make sure that collection name contains only alphanumeric characters',
				});
			}
			throw new NodeOperationError(context.getNode(), error as Error, { itemIndex });
		}
	},
}) {}

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Read the full wrapped error in node output/logs to get the real cause (auth, network, dimension, etc.).
  2. Verify the zepApi credential apiKey and (for self-hosted) apiUrl are correct and reachable from the n8n host.
  3. Set embeddingDimensions to match your embedding model's output dimension.
  4. If the 400 branch never matched but you expected it to, note responseData.includes(...) can itself throw when responseData is undefined — treat any untyped Zep error as 'inspect the original'.
  5. Retry after rate-limit windows; check Zep service health for 5xx.

Example fix

// before: embeddingDimensions defaulted to 1536 but model outputs 3072
// after:  set embeddingDimensions = 3072 to match the configured embeddings model
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-flight the Zep connection + dimensions
if (!credentials.apiKey) throw new Error('Missing zepApi apiKey'); if (options.embeddingDimensions && options.embeddingDimensions !== modelDim) throw new Error('embeddingDimensions mismatch');

Type guard

function isZepError(e: unknown): e is { code: number; responseData: string } { return !!e && typeof (e as any).code === 'number' && typeof (e as any).responseData === 'string'; }

Try / catch

try { await ZepVectorStore.fromDocuments(...) } catch (e) { logOriginal(e); if (isAuthError(e)) refreshCredentials(); else throw new Error(`Zep populate failed: ${(e as Error).message}`); }

Prevention

When it happens

Trigger: ZepCloudVectorStore.fromDocuments / ZepVectorStore.fromDocuments rejects for any reason other than the collection-creation 400 — e.g. auth failure (bad apiKey), network error, embedding dimension mismatch, rate limiting, apiUrl unreachable, or responseData being undefined so the .includes() check itself is bypassed/thrown.

Common situations: Wrong/missing Zep API key; self-hosted apiUrl wrong/unreachable; embeddingDimensions option does not match the model; Zep rate-limits or returns 5xx; the response shape changed so the code/data extraction yields undefined.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/3b7ea6fa2923b3d4. Report an issue: GitHub.