{"record":{"id":"e1d00f49910d8ecb","repo":"plandex-ai/plandex","slug":"error-getting-cached-map-v","errorCode":null,"errorMessage":"error getting cached map: %v","messagePattern":"error getting cached map: (.+?)","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"app/server/handlers/file_maps.go","lineNumber":147,"sourceCode":"\n\tcachedMetaByPath := map[string]*shared.Context{}\n\tcachedMapsByPath := map[string]*db.CachedMap{}\n\tvar mu sync.Mutex\n\terrCh := make(chan error, len(req.FilePaths))\n\n\tfor _, path := range req.FilePaths {\n\t\tgo func(path string) {\n\t\t\tdefer func() {\n\t\t\t\tif r := recover(); r != nil {\n\t\t\t\t\tlog.Printf(\"panic in LoadCachedFileMapHandler: %v\\n%s\", r, debug.Stack())\n\t\t\t\t\terrCh <- fmt.Errorf(\"panic in LoadCachedFileMapHandler: %v\\n%s\", r, debug.Stack())\n\t\t\t\t\truntime.Goexit() // don't allow outer function to continue and double-send to channel\n\t\t\t\t}\n\t\t\t}()\n\n\t\t\tcachedContext, err := db.GetCachedMap(plan.OrgId, plan.ProjectId, path)\n\t\t\tif err != nil {\n\t\t\t\terrCh <- fmt.Errorf(\"error getting cached map: %v\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif cachedContext != nil {\n\t\t\t\tmu.Lock()\n\t\t\t\tcachedMetaByPath[path] = cachedContext.ToMeta().ToApi()\n\t\t\t\tcachedMapsByPath[path] = &db.CachedMap{\n\t\t\t\t\tMapParts:  cachedContext.MapParts,\n\t\t\t\t\tMapShas:   cachedContext.MapShas,\n\t\t\t\t\tMapTokens: cachedContext.MapTokens,\n\t\t\t\t\tMapSizes:  cachedContext.MapSizes,\n\t\t\t\t}\n\t\t\t\tmu.Unlock()\n\t\t\t}\n\t\t\terrCh <- nil\n\t\t}(path)\n\t}\n\n\tfor range req.FilePaths {","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/server/handlers/file_maps.go#L129-L165","documentation":"In LoadCachedFileMapHandler, db.GetCachedMap fails for a requested file path while assembling cached map data. DB/storage read error for the cached map record — not a cache miss (nil result is handled separately).","triggerScenarios":"Thrown at app/server/handlers/file_maps.go:147 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped GetCachedMap error (DB/storage)","Verify the cache record for that plan/path is not corrupted","Re-generate the map by loading without cache"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}