{"record":{"id":"55fd87a78b704501","repo":"xpzouying/xiaohongshu-mcp","slug":"feed-s-not-in-notedetailmap","errorCode":null,"errorMessage":"feed %s not in noteDetailMap","messagePattern":"feed (.+?) not in noteDetailMap","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xiaohongshu/like_favorite.go","lineNumber":233,"sourceCode":"\tif result == \"\" {\n\t\treturn false, false, myerrors.ErrNoFeedDetail\n\t}\n\n\tvar noteDetailMap map[string]struct {\n\t\tNote struct {\n\t\t\tInteractInfo struct {\n\t\t\t\tLiked     bool `json:\"liked\"`\n\t\t\t\tCollected bool `json:\"collected\"`\n\t\t\t} `json:\"interactInfo\"`\n\t\t} `json:\"note\"`\n\t}\n\tif err := json.Unmarshal([]byte(result), &noteDetailMap); err != nil {\n\t\treturn false, false, errors.Wrap(err, \"unmarshal noteDetailMap failed\")\n\t}\n\n\tdetail, ok := noteDetailMap[feedID]\n\tif !ok {\n\t\treturn false, false, fmt.Errorf(\"feed %s not in noteDetailMap\", feedID)\n\t}\n\treturn detail.Note.InteractInfo.Liked, detail.Note.InteractInfo.Collected, nil\n}\n","sourceCodeStart":215,"sourceCodeEnd":237,"githubUrl":"https://github.com/xpzouying/xiaohongshu-mcp/blob/332d196854a9eac0d2b8c2c0e3d0cc43139d724c/xiaohongshu/like_favorite.go#L215-L237","documentation":"getInteractState 解析 __INITIAL_STATE__ 的 noteDetailMap 时，其中不存在传入 feedID 对应的条目：该笔记详情未被页面加载（feedID 无效或数据未注入），无法读取其点赞/收藏状态。","triggerScenarios":"Thrown at xiaohongshu/like_favorite.go:233 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["确认 feedID 来自有效的笔记列表","等待页面完成加载后重读状态","导航到该笔记详情页触发数据注入"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"332d196854a9eac0d2b8c2c0e3d0cc43139d724c","analyzedAt":"2026-09-05T22:22:55.988Z","contentChangedAt":"2026-09-05T22:22:55.988Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}