{"record":{"id":"83ff2a55c4d77f66","repo":"FlowiseAI/Flowise","slug":"e-83ff2a","errorCode":null,"errorMessage":"${e}","messagePattern":"\\$\\{e\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/agentflow/Retriever/Retriever.ts","lineNumber":216,"sourceCode":"            }\n\n            newState = processTemplateVariables(newState, finalOutput)\n\n            const returnOutput = {\n                id: nodeData.id,\n                name: this.name,\n                input: {\n                    question: retrieverQuery || input\n                },\n                output: {\n                    content: finalOutput\n                },\n                state: newState\n            }\n\n            return returnOutput\n        } catch (e) {\n            throw new Error(e)\n        }\n    }\n}\n\nmodule.exports = { nodeClass: Retriever_Agentflow }\n","sourceCodeStart":198,"sourceCodeEnd":222,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/agentflow/Retriever/Retriever.ts#L198-L222","documentation":"Retriever_Agentflow.run()'s catch block re-throws every exception as `new Error(e)`. Like errors 20/28/35, `new Error(<Error>)` stringifies the original (\"Error: ...\") and discards its stack and type. The successfully-built returnOutput above is abandoned.","triggerScenarios":"The underlying vector store / retriever call fails: missing API key for embeddings, collection/index not found, embedding dimension mismatch, document store unreachable, empty query when retriever requires one.","commonSituations":"Vector DB not started or wrong connection string; embedder credential missing; queried a non-existent namespace/filter; Pinecone/Weaviate/Qdrant quota or network issue.","solutions":["Check server logs for the retriever's original error printed before the re-throw (if logged) — otherwise enable verbose logging.","Verify the embedder model credential and that the vector store connection is healthy.","Confirm the collection/index and any metadata filter exist.","Patch the throw to `throw new Error(e instanceof Error ? e.message : String(e), { cause: e })` to keep the stack."],"exampleFix":"// before\n        } catch (e) {\n            throw new Error(e)\n        }\n// after\n        } catch (e) {\n            throw new Error(e instanceof Error ? e.message : String(e), { cause: e })\n        }","handlingStrategy":"try-catch","validationCode":"const query = nodeData.inputs?.retrieverQuery || input\nif (!query || (typeof query === 'string' && query.trim() === '')) {\n  throw new Error('Retriever requires a non-empty query')\n}","typeGuard":null,"tryCatchPattern":"try {\n  await retrieverNode.run(nodeData, input, options)\n} catch (e) {\n  // original stack lost; check vector-store health and embedder credential\n  throw e\n}","preventionTips":["Verify vector store connection and embedder credential before runtime.","Confirm the collection/index and namespace exist.","Keep retriever queries non-empty.","Log the underlying retriever error separately before the node's catch swallows it."],"tags":["agentflow","retriever","vector-store","error-wrapping","stack-trace-loss"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}