{"record":{"id":"bd24f914d030f92d","repo":"n8n-io/n8n","slug":"error","errorCode":null,"errorMessage":"${error}","messagePattern":"\\$\\{error\\}","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.ts","lineNumber":408,"sourceCode":"\n\t\t\t\tlet receivedData: ExecuteWorkflowData;\n\t\t\t\ttry {\n\t\t\t\t\treceivedData = await this.executeFunctions.executeWorkflow(\n\t\t\t\t\t\tworkflowInfo,\n\t\t\t\t\t\titems,\n\t\t\t\t\t\tconfig?.getChild(),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparentExecution: {\n\t\t\t\t\t\t\t\texecutionId: workflowProxy.$execution.id,\n\t\t\t\t\t\t\t\tworkflowId: workflowProxy.$workflow.id,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\treturnLastRunOnly: true, // Retrieved documents are the sub-workflow's final-run output, not its intermediate pipeline steps.\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// Make sure a valid error gets returned that can by json-serialized else it will\n\t\t\t\t\t// not show up in the frontend\n\t\t\t\t\tthrow new NodeOperationError(this.executeFunctions.getNode(), error as Error);\n\t\t\t\t}\n\n\t\t\t\tconst receivedItems = receivedData.data?.[0] ?? [];\n\n\t\t\t\tconst returnData: Document[] = [];\n\t\t\t\tfor (const [index, itemData] of receivedItems.entries()) {\n\t\t\t\t\tconst pageContent = objectToString(itemData.json);\n\t\t\t\t\treturnData.push(\n\t\t\t\t\t\tnew Document({\n\t\t\t\t\t\t\tpageContent: `### ${index + 1}. Context data:\\n${pageContent}`,\n\t\t\t\t\t\t\tmetadata: {\n\t\t\t\t\t\t\t\t...baseMetadata,\n\t\t\t\t\t\t\t\titemIndex: index,\n\t\t\t\t\t\t\t\texecutionId: receivedData.executionId,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}","sourceCodeStart":390,"sourceCodeEnd":426,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.ts#L390-L426","documentation":"Catch-all around executeWorkflow in the Retriever Workflow node: launching the sub-workflow threw. The raw error is normalized (json-serializable message) so it reliably reaches the execution log instead of being lost in serialization.","triggerScenarios":"Thrown at packages/@n8n/nodes-langchain/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.ts:408 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded message — sub-workflow crash or configuration error","Run the sub-workflow directly to reproduce and fix it"],"exampleFix":null,"handlingStrategy":"try-catch","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"}