n8n-io/n8n · error · NodeOperationError

It was not possible to extract the table from the Database…

Error message

It was not possible to extract the table from the Database Endpoint.

What it means

The Xata memory node derives the table name by regex-matching the credential's databaseEndpoint URL (https://<workspace>.<region>.xata.sh/db/<database>). The match returned null, so the endpoint is malformed or not a Xata database URL and the history table cannot be determined.

Solutions

  1. Set databaseEndpoint to a valid Xata database URL in the expected format
  2. Copy the exact endpoint URL from the Xata dashboard
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/memory/MemoryXata/MemoryXata.node.ts:128 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at packages/@n8n/nodes-langchain/nodes/memory/MemoryXata/MemoryXata.node.ts:128

		if (nodeVersion >= 1.2) {
			sessionId = getSessionId(this, itemIndex);
		} else {
			sessionId = this.getNodeParameter('sessionId', itemIndex) as string;
		}

		const xataClient = new BaseClient({
			apiKey: credentials.apiKey as string,
			branch: (credentials.branch as string) || 'main',
			databaseURL: credentials.databaseEndpoint as string,
		});

		const table = (credentials.databaseEndpoint as string).match(
			/https:\/\/[^.]+\.[^.]+\.xata\.sh\/db\/([^\/:]+)/,
		);

		if (table === null) {
			throw new NodeOperationError(
				this.getNode(),
				'It was not possible to extract the table from the Database Endpoint.',
			);
		}

		const chatHistory = new XataChatMessageHistory({
			table: table[1],
			sessionId,
			client: xataClient,
			apiKey: credentials.apiKey as string,
		});

		const memClass = this.getNode().typeVersion < 1.3 ? BufferMemory : BufferWindowMemory;
		const kOptions =
			this.getNode().typeVersion < 1.3
				? {}
				: { k: this.getNodeParameter('contextWindowLength', itemIndex) };

View on GitHub (pinned to 5ac6606e81)