{"record":{"id":"86f7eaed474f5f3c","repo":"Kong/insomnia","slug":"returned-no-results-sanitizedfilter","errorCode":null,"errorMessage":"Returned no results: ${sanitizedFilter}","messagePattern":"Returned no results: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/common/templating/local-template-tags.ts","lineNumber":729,"sourceCode":"              // 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) {\n            throw new Error('Must pass an XPath query.');\n          }\n          try {\n            const selectedValues = (await import('xpath')).select(sanitizedFilter, document as unknown as Node); // https://github.com/xmldom/xmldom/issues/724","sourceCodeStart":711,"sourceCodeEnd":747,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/common/templating/local-template-tags.ts#L711-L747","documentation":"Error \"Returned no results: ${sanitizedFilter}\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia/src/common/templating/local-template-tags.ts:729 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"}