{"record":{"id":"5f353acd85a161f6","repo":"n8n-io/n8n","slug":"only-the-load-update-insert-and-retrieve","errorCode":null,"errorMessage":"Only the \"load\", \"update\", \"insert\", and \"retrieve-as-tool\" operation modes are supported with execute","messagePattern":"Only the \"load\", \"update\", \"insert\", and \"retrieve-as-tool\" operation modes are supported with execute","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/ai-utilities/src/utils/vector-store/createVectorStoreNode/createVectorStoreNode.ts","lineNumber":466,"sourceCode":"\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\tconst items = this.getInputData(0);\n\t\t\t\t\tconst resultData = [];\n\n\t\t\t\t\tfor (let itemIndex = 0; itemIndex < items.length; itemIndex++) {\n\t\t\t\t\t\tconst docs = await handleRetrieveAsToolExecuteOperation(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\targs,\n\t\t\t\t\t\t\tembeddings,\n\t\t\t\t\t\t\titemIndex,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tresultData.push(...docs);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn [resultData];\n\t\t\t\t}\n\n\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t'Only the \"load\", \"update\", \"insert\", and \"retrieve-as-tool\" operation modes are supported with execute',\n\t\t\t\t);\n\t\t\t} catch (error) {\n\t\t\t\tnormalizeVectorStoreError(this.getNode(), error);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Method to supply data to AI nodes\n\t\t * Supports 'retrieve' and 'retrieve-as-tool' operation modes\n\t\t */\n\t\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\t\ttry {\n\t\t\t\tconst mode = this.getNodeParameter('mode', 0) as NodeOperationMode;\n\n\t\t\t\t// Get the embeddings model connected to this node\n\t\t\t\tconst embeddings = (await this.getInputConnectionData(","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/ai-utilities/src/utils/vector-store/createVectorStoreNode/createVectorStoreNode.ts#L448-L484","documentation":"Mode-validation error raised in the vector store node's execute(). It fires when the node's selected operation mode is none of the four modes the runtime execute path supports (load, update, insert, retrieve-as-tool). Generic guard mapping unsupported mode selections to a clear error instead of undefined behavior.","triggerScenarios":"Thrown at packages/@n8n/ai-utilities/src/utils/vector-store/createVectorStoreNode/createVectorStoreNode.ts:466 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the node's operation mode to one of load, update, insert, or retrieve-as-tool.","Check the mode parameter value for typos or stale workflow data referencing a removed mode.","For insert-like behaviour use 'insert'; for querying inside an AI chain use 'retrieve-as-tool'."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","contentChangedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}