n8n-io/n8n · error · NodeOperationError

Error: ${errorMessage}

Error message

Error: ${errorMessage}

What it means

The generic fallback in the connection catch block: an error occurred while connecting to Azure AI Search that did NOT match the 401/403 string patterns. The original error message is appended to 'Error: ' so the user can diagnose. Common causes are network/DNS, malformed endpoint, or a missing index.

Source

Thrown at packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreAzureAISearch/VectorStoreAzureAISearch.node.ts:324

				},
			);
		}

		// Check for authorization errors (403)
		if (error.message?.includes('403') || error.message?.includes('Forbidden')) {
			throw new NodeOperationError(
				context.getNode(),
				'Authorization failed - insufficient permissions.',
				{
					itemIndex,
					description:
						'The API Key does not have sufficient permissions. Ensure the key has the required access level for this operation.',
				},
			);
		}

		const errorMessage = error instanceof Error ? error.message : String(error);
		throw new NodeOperationError(context.getNode(), `Error: ${errorMessage}`, {
			itemIndex,
			description: 'Please check your Azure AI Search connection details',
		});
	}
}

function getQueryType(
	context: IExecuteFunctions | ISupplyDataFunctions,
	itemIndex: number,
): AzureAISearchQueryType {
	const queryType = getOptionValue<string>('queryType', context, itemIndex, 'hybrid');

	switch (queryType) {
		case 'vector':
			return AzureAISearchQueryType.Similarity;
		case 'hybrid':
			return AzureAISearchQueryType.SimilarityHybrid;
		case 'semanticHybrid':

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Read the appended message for the real cause (DNS, TLS, 404 index missing, etc.).
  2. Verify the endpoint URL is well-formed and reachable from the n8n host.
  3. If the index is expected to pre-exist, confirm it exists in Azure; if the node should create it, ensure that path is enabled.
  4. Check network/firewall egress from the n8n host to *.search.windows.net.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await getAzureAISearchClient(context, embeddings, itemIndex);
} catch (e) {
  // e.message is 'Error: <original>'; surface e.description and the original message to logs
  context.logger.error('Azure AI Search connection failed', { message: e.message });
}

Prevention

When it happens

Trigger: Any error in getAzureAISearchClient's try block whose message lacks '401'/'Unauthorized'/'authentication failed'/'403'/'Forbidden' — e.g. ENOTFOUND, ECONNREFUSED, TLS error, index-not-found.

Common situations: Endpoint URL malformed or unreachable (DNS/network); self-signed/untrusted TLS certificate; the index does not exist and the node expected it; SDK API-version mismatch producing a non-auth error.

Related errors


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