{"record":{"id":"47869e604afc4858","repo":"FlowiseAI/Flowise","slug":"no-extraction-path-configured","errorCode":null,"errorMessage":"No extraction path configured","messagePattern":"No extraction path configured","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/tools/JSONPathExtractor/JSONPathExtractor.ts","lineNumber":35,"sourceCode":"            .describe('JSON data to extract value from')\n    })\n\n    private readonly path: string\n    private readonly returnNullOnError: boolean\n\n    constructor(path: string, returnNullOnError: boolean = false) {\n        super()\n        this.path = path\n        this.returnNullOnError = returnNullOnError\n    }\n\n    async _call({ json }: z.infer<typeof this.schema>): Promise<string> {\n        // Validate that path is configured\n        if (!this.path) {\n            if (this.returnNullOnError) {\n                return 'null'\n            }\n            throw new Error('No extraction path configured')\n        }\n\n        let data: any\n\n        // Parse JSON string if needed\n        if (typeof json === 'string') {\n            try {\n                data = JSON.parse(json)\n            } catch (error) {\n                if (this.returnNullOnError) {\n                    return 'null'\n                }\n                throw new Error(`Invalid JSON string: ${error instanceof Error ? error.message : 'Parse error'}`)\n            }\n        } else {\n            data = json\n        }\n","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/tools/JSONPathExtractor/JSONPathExtractor.ts#L17-L53","documentation":"Thrown by JSONPathExtractorTool._call when this.path is falsy AND returnNullOnError is false. The tool is constructed with a path in init (which itself guards against empty path via error 387), so reaching here at call time means the path was set to an empty string after construction — e.g. the field was cleared, a dynamic re-init ran with an empty value, or an extension subclassed the tool with path=''. The returnNullOnError flag is the explicit escape hatch that converts this throw into a 'null' return.","triggerScenarios":"The node's JSON Path input was left blank or filled with whitespace, or the tool instance was constructed programmatically with '' as path (bypassing the init guard). At _call time, the empty path makes lodash.get meaningless, so the tool refuses rather than silently returning the whole object.","commonSituations":"A flow where the path is wired from an upstream variable that resolves to empty; a copied node whose path field wasn't updated; programmatic use of JSONPathExtractorTool without going through the INode.init path.","solutions":["Set the JSON Path input in the node (e.g. 'data', 'user.name', 'items[0].id').","If empty path is a legitimate runtime state, enable Return Null on Error so the tool emits 'null' instead of throwing.","If constructing the tool directly, pass a non-empty path to the constructor.","Trace the upstream variable feeding path and add a default value."],"exampleFix":"// before\nnew JSONPathExtractorTool('', false)\n// after\nnew JSONPathExtractorTool('data.result', false)","handlingStrategy":"validation","validationCode":"function makeExtractor(path: string, returnNullOnError = false) {\n  if (!path || !path.trim()) throw new Error('path is required — set it before constructing JSONPathExtractorTool')\n  return new JSONPathExtractorTool(path.trim(), returnNullOnError)\n}","typeGuard":"function hasNonEmptyPath(o: { path?: unknown }): o is { path: string } {\n  return typeof o.path === 'string' && o.path.trim().length > 0\n}","tryCatchPattern":"try {\n  return await extractor.invoke({ json })\n} catch (e) {\n  if (e instanceof Error && e.message === 'No extraction path configured') {\n    return 'null' // or reconfigure with a default path\n  }\n  throw e\n}","preventionTips":["Always pass a non-empty path to the constructor; never ''.","If path may legitimately be empty at runtime, enable returnNullOnError.","For dynamic paths, validate upstream before assigning to the node input.","Audit subclassed/extended tools that might bypass the init guard."],"tags":["jsonpath","config","validation","required-field"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}