{"record":{"id":"fb6b00ad0e946638","repo":"FlowiseAI/Flowise","slug":"path-this-path-not-found-in-json-received","errorCode":null,"errorMessage":"Path \"${this.path}\" not found in JSON. Received: ${preview}","messagePattern":"Path \"(.+?)\" not found in JSON\\. Received: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/tools/JSONPathExtractor/JSONPathExtractor.ts","lineNumber":63,"sourceCode":"                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\n        // Extract value using lodash get\n        const value = get(data, this.path)\n\n        if (value === undefined) {\n            if (this.returnNullOnError) {\n                return 'null'\n            }\n            const jsonPreview = JSON.stringify(data, null, 2)\n            const preview = jsonPreview.length > 200 ? jsonPreview.substring(0, 200) + '...' : jsonPreview\n            throw new Error(`Path \"${this.path}\" not found in JSON. Received: ${preview}`)\n        }\n\n        return typeof value === 'string' ? value : JSON.stringify(value)\n    }\n}\n\n/**\n * Node implementation for JSON Path Extractor tool\n */\nclass JSONPathExtractor_Tools implements INode {\n    label: string\n    name: string\n    version: number\n    type: string\n    icon: string\n    category: string\n    description: string\n    baseClasses: string[]","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/tools/JSONPathExtractor/JSONPathExtractor.ts#L45-L81","documentation":"Thrown by JSONPathExtractorTool._call when lodash.get(data, this.path) returns undefined and returnNullOnError is false. The message includes the configured path and a truncated (200-char) pretty-printed preview of the received data, so the developer can see the actual shape and spot the mismatch. This is the 'wrong path / schema drift' signal.","triggerScenarios":"Path references a field that doesn't exist (user.address.zipcode when payload has user.location.zip), a numeric index out of bounds (items[5] on a 3-element array), a typo in the path, or upstream schema change where a key was renamed. The preview helps confirm whether data is empty {} vs. mis-shaped.","commonSituations":"API response schema changed without updating the extractor path; the upstream tool returned an error envelope {error:...} instead of the expected {data:...}; an array path used when the payload is a single object; case mismatch (Name vs name).","solutions":["Inspect the preview in the error message — it shows the real keys present; correct the path to match an existing key.","If the missing path is a legitimate optional field, enable returnNullOnError.","For arrays, confirm the index is in bounds; for nested paths, walk one segment at a time to find where get diverges.","Guard upstream: if the source is an API, assert its schema (zod) so drift is caught before extraction."],"exampleFix":"// before — path mismatched after API rename\nnew JSONPathExtractorTool('user.address.zip', false)\n// after\nnew JSONPathExtractorTool('user.location.zip', false)","handlingStrategy":"validation","validationCode":"function assertPathExists(data: any, path: string) {\n  if (get(data, path) === undefined) {\n    throw new Error(`path '${path}' absent in data; keys: ${Object.keys(data ?? {}).slice(0,10).join(', ')}`)\n  }\n}","typeGuard":"function pathResolves(data: unknown, path: string): boolean {\n  return get(data, path) !== undefined\n}","tryCatchPattern":"try {\n  return await extractor.invoke({ json })\n} catch (e) {\n  if (e instanceof Error && e.message.includes('not found in JSON')) {\n    // inspect the preview, correct the path, or enable returnNullOnError\n    return enableNullModeAndRetry(extractor, json)\n  }\n  throw e\n}","preventionTips":["Inspect the 200-char data preview in the error to confirm the real keys.","For optional fields, enable returnNullOnError on the node.","Walk nested paths one segment at a time during debugging.","Assert the upstream API schema (zod) so renames surface before extraction."],"tags":["jsonpath","schema-drift","validation","lodash"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}