{"record":{"id":"e8925d6abca8089b","repo":"n8n-io/n8n","slug":"azure-ai-search-endpoint-is-missing-or-invalid","errorCode":null,"errorMessage":"Azure AI Search endpoint is missing or invalid","messagePattern":"Azure AI Search endpoint is missing or invalid","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreAzureAISearch/VectorStoreAzureAISearch.node.ts","lineNumber":179,"sourceCode":"\tdefaultValue?: T,\n): T | undefined {\n\tconst options: IDataObject = context.getNodeParameter('options', itemIndex, {});\n\treturn options[name] !== undefined ? (options[name] as T) : defaultValue;\n}\n\ninterface ValidatedCredentials {\n\tendpoint: string;\n\tapiKey: string;\n}\n\nasync function getValidatedCredentials(\n\tcontext: IFunctionsContext,\n\titemIndex: number,\n): Promise<ValidatedCredentials> {\n\tconst credentials = await context.getCredentials(AZURE_AI_SEARCH_CREDENTIALS);\n\n\tif (!credentials.endpoint || typeof credentials.endpoint !== 'string') {\n\t\tthrow new NodeOperationError(\n\t\t\tcontext.getNode(),\n\t\t\t'Azure AI Search endpoint is missing or invalid',\n\t\t\t{ itemIndex },\n\t\t);\n\t}\n\n\tif (!credentials.apiKey || typeof credentials.apiKey !== 'string') {\n\t\tthrow new NodeOperationError(context.getNode(), 'API Key is required for authentication', {\n\t\t\titemIndex,\n\t\t});\n\t}\n\n\treturn {\n\t\tendpoint: credentials.endpoint,\n\t\tapiKey: credentials.apiKey,\n\t};\n}\n","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreAzureAISearch/VectorStoreAzureAISearch.node.ts#L161-L197","documentation":"getValidatedCredentials throws this NodeOperationError when the Azure AI Search credential's 'endpoint' field is missing or not a string. The Search Endpoint URL (https://<service>.search.windows.net) is mandatory to build the SearchClient.","triggerScenarios":"context.getCredentials(AZURE_AI_SEARCH_CREDENTIALS) returns an object where 'endpoint' is undefined, empty, or not of type 'string'.","commonSituations":"The credential was created but the endpoint field left blank; the credential was partially filled and saved; the credential referenced by the node was deleted or replaced with an empty one.","solutions":["Open the Azure AI Search credential and set the endpoint to the full URL (https://<your-service>.search.windows.net).","Re-select the credential in the node to refresh the reference.","Verify the credential is saved (not just opened) after entering the endpoint."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const cred = await context.getCredentials(AZURE_AI_SEARCH_CREDENTIALS);\nif (typeof cred?.endpoint !== 'string' || cred.endpoint.trim() === '') {\n  throw new Error('Azure AI Search credential is missing a valid endpoint URL.');\n}","typeGuard":"function hasValidEndpoint(c: unknown): c is { endpoint: string } {\n  return typeof c === 'object' && c !== null &&\n    typeof (c as any).endpoint === 'string' && (c as any).endpoint.startsWith('https://');\n}","tryCatchPattern":null,"preventionTips":["Validate the endpoint URL format when creating the credential.","Pair endpoint + apiKey validation in a single helper used by every entry point."],"tags":["credentials","configuration","azure-ai-search","vector-store","validation"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}