{"record":{"id":"d9f4a07342d5f714","repo":"emberjs/ember.js","slug":"invalid-keypath-path-valid-keys-index-i","errorCode":null,"errorMessage":"invalid keypath: '${path}', valid keys: @index, @identity, or a path","messagePattern":"invalid keypath: '(.+?)', valid keys: @index, @identity, or a path","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@glimmer/reference/lib/iterable.ts","lineNumber":55,"sourceCode":"type KeyFor = (item: unknown, index: unknown) => unknown;\n\nconst NULL_IDENTITY = {};\n\nconst KEY: KeyFor = (_, index) => index;\nconst INDEX: KeyFor = (_, index) => String(index);\nconst IDENTITY: KeyFor = (item) => {\n  if (item === null) {\n    // Returning null as an identity will cause failures since the iterator\n    // can't tell that it's actually supposed to be null\n    return NULL_IDENTITY;\n  }\n\n  return item;\n};\n\nfunction keyForPath(path: string): KeyFor {\n  if (DEBUG && path[0] === '@') {\n    throw new Error(`invalid keypath: '${path}', valid keys: @index, @identity, or a path`);\n  }\n  return uniqueKeyFor((item) => {\n    if (item === null || item === undefined) {\n      return item;\n    }\n    return getPath(item, path);\n  });\n}\n\nfunction makeKeyFor(key: string) {\n  switch (key) {\n    case '@key':\n      return uniqueKeyFor(KEY);\n    case '@index':\n      return uniqueKeyFor(INDEX);\n    case '@identity':\n      return uniqueKeyFor(IDENTITY);\n    default:","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@glimmer/reference/lib/iterable.ts#L37-L73","documentation":"Error \"invalid keypath: '${path}', valid keys: @index, @identity, or a path\" thrown in emberjs/ember.js.","triggerScenarios":"Thrown at packages/@glimmer/reference/lib/iterable.ts:55 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":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}