{"record":{"id":"fb20778819914aef","repo":"Kong/insomnia","slug":"invalid-jsonpath-query-sanitizedfilter","errorCode":null,"errorMessage":"Invalid JSONPath query: ${sanitizedFilter}","messagePattern":"Invalid JSONPath query: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/common/templating/local-template-tags.ts","lineNumber":725,"sourceCode":"            let bodyJSON;\n            let results;\n\n            try {\n              // Using JSONBig instead of JSON.parse because JSON can contain numbers larger than those representable by\n              // IEEE 754 and cause them to be rounded or transformed into scientific notation. Interpreting them as\n              // strings in the context of this tag allows for predictable piping from response to request.\n              bodyJSON = JSONBigStringParser.parse(body) as null | boolean | number | string | object | unknown[];\n            } catch (err) {\n              throw new Error(`Invalid JSON: ${err.message}`);\n            }\n\n            try {\n              results = await JSONPath({ json: bodyJSON, path: sanitizedFilter });\n              if (!Array.isArray(results)) {\n                results = [results];\n              }\n            } catch {\n              throw new Error(`Invalid JSONPath query: ${sanitizedFilter}`);\n            }\n\n            if (results.length === 0) {\n              throw new Error(`Returned no results: ${sanitizedFilter}`);\n            }\n\n            if (results.length > 1) {\n              return JSON.stringify(results);\n            }\n\n            if (typeof results[0] !== 'string') {\n              return JSON.stringify(results[0]);\n            }\n            return results[0];\n          }\n          const DOMParser = (await import('@xmldom/xmldom')).DOMParser;\n          const document = new DOMParser().parseFromString(body, 'text/xml');\n          if (sanitizedFilter === undefined) {","sourceCodeStart":707,"sourceCodeEnd":743,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/common/templating/local-template-tags.ts#L707-L743","documentation":"Error \"Invalid JSONPath query: ${sanitizedFilter}\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia/src/common/templating/local-template-tags.ts:725 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}