{"record":{"id":"362aae0fe35f1e51","repo":"n8n-io/n8n","slug":"error-errormessage","errorCode":null,"errorMessage":"Error: ${errorMessage}","messagePattern":"Error: (.+?)","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreAzureAISearch/VectorStoreAzureAISearch.node.ts","lineNumber":324,"sourceCode":"\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\t// Check for authorization errors (403)\n\t\tif (error.message?.includes('403') || error.message?.includes('Forbidden')) {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tcontext.getNode(),\n\t\t\t\t'Authorization failed - insufficient permissions.',\n\t\t\t\t{\n\t\t\t\t\titemIndex,\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'The API Key does not have sufficient permissions. Ensure the key has the required access level for this operation.',\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\tconst errorMessage = error instanceof Error ? error.message : String(error);\n\t\tthrow new NodeOperationError(context.getNode(), `Error: ${errorMessage}`, {\n\t\t\titemIndex,\n\t\t\tdescription: 'Please check your Azure AI Search connection details',\n\t\t});\n\t}\n}\n\nfunction getQueryType(\n\tcontext: IExecuteFunctions | ISupplyDataFunctions,\n\titemIndex: number,\n): AzureAISearchQueryType {\n\tconst queryType = getOptionValue<string>('queryType', context, itemIndex, 'hybrid');\n\n\tswitch (queryType) {\n\t\tcase 'vector':\n\t\t\treturn AzureAISearchQueryType.Similarity;\n\t\tcase 'hybrid':\n\t\t\treturn AzureAISearchQueryType.SimilarityHybrid;\n\t\tcase 'semanticHybrid':","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreAzureAISearch/VectorStoreAzureAISearch.node.ts#L306-L342","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the appended message for the real cause (DNS, TLS, 404 index missing, etc.).","Verify the endpoint URL is well-formed and reachable from the n8n host.","If the index is expected to pre-exist, confirm it exists in Azure; if the node should create it, ensure that path is enabled.","Check network/firewall egress from the n8n host to *.search.windows.net."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await getAzureAISearchClient(context, embeddings, itemIndex);\n} catch (e) {\n  // e.message is 'Error: <original>'; surface e.description and the original message to logs\n  context.logger.error('Azure AI Search connection failed', { message: e.message });\n}","preventionTips":["Read the appended original message to classify non-auth failures.","Verify endpoint reachability and TLS from the n8n host as part of deployment checks."],"tags":["azure-ai-search","vector-store","network","fallback-error","configuration"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}