{"record":{"id":"b71e9d3f20ab65af","repo":"Kong/insomnia","slug":"eachparent-is-not-supported-yet","errorCode":null,"errorMessage":"eachParent is not supported yet","messagePattern":"eachParent is not supported yet","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/properties.ts","lineNumber":257,"sourceCode":"  count() {\n    return this.list.length;\n  }\n\n  each(iterator: (item: T) => void, context: object) {\n    interface Iterator {\n      context?: object;\n      (item: T): void;\n    }\n    const it: Iterator = iterator;\n    it.context = context;\n\n    this.list.forEach(it);\n  }\n\n  // TODO: unsupported yet as properties are not organized as hierarchy\n\n  eachParent(_iterator: (parent: Property, prev: Property) => void, _context?: object) {\n    throw unsupportedError('eachParent');\n  }\n\n  filter(rule: (item: T) => boolean, context: object) {\n    interface Iterator {\n      context?: object;\n      (item: T): boolean;\n    }\n    const it: Iterator = rule;\n    it.context = context;\n\n    return this.list.filter(it);\n  }\n\n  // TODO: support returning {Item|ItemGroup}\n  find(rule: (item: T) => boolean, context?: object) {\n    interface Finder {\n      context?: object;\n      (item: T): boolean;","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/properties.ts#L239-L275","documentation":"Deliberate unsupported-API error in the scripting environment's PropertyList: eachParent() mirrors Postman's SDK but Insomnia properties are not organized as a hierarchy, so calling it from a pre-request/after-response script always throws instead of iterating.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/properties.ts:257 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace eachParent(...) in the script with iteration over the list, e.g. via each() or count()+indexing","Avoid relying on Postman-specific hierarchical property APIs in Insomnia scripts"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","contentChangedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}