{"record":{"id":"9ceeaffb05835f94","repo":"xpzouying/xiaohongshu-mcp","slug":"errnofeeddetail","errorCode":"ErrNoFeedDetail","errorMessage":"没有捕获到 feed 详情数据","messagePattern":"没有捕获到 feed 详情数据","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"errors/errors.go","lineNumber":6,"sourceCode":"package errors\n\nimport \"errors\"\n\nvar ErrNoFeeds = errors.New(\"没有捕获到 feeds 数据\")\nvar ErrNoFeedDetail = errors.New(\"没有捕获到 feed 详情数据\")\n","sourceCodeStart":1,"sourceCodeEnd":7,"githubUrl":"https://github.com/xpzouying/xiaohongshu-mcp/blob/332d196854a9eac0d2b8c2c0e3d0cc43139d724c/errors/errors.go#L1-L7","documentation":"ErrNoFeedDetail is a sentinel error returned when the note/feed detail extraction yields an empty string. extractFeedDetail (xiaohongshu/feed_detail.go:980) and getInteractState (xiaohongshu/like_favorite.go:216) return it, meaning the detail JSON or interact state could not be captured from the page.","triggerScenarios":"Calling feed detail extraction or like/favorite state retrieval when the injected extraction script evaluates to an empty string — e.g. `if result == \"\"` branches at feed_detail.go:980 and like_favorite.go:216. Occurs when the note page did not render its state (window.__INITIAL_STATE__) or the note was deleted/hidden.","commonSituations":"Accessing a deleted, private, or region-locked note; page requiring login before detail data hydrates; site redesign changing the state variable or selectors so extraction returns empty; rate limiting causing a verification page instead of the note.","solutions":["Verify the session is logged in and the note URL is publicly accessible before extracting","Capture page HTML/screenshot on failure to check whether __INITIAL_STATE__ is present; update extraction selectors if the site changed","Retry the navigation once with humanized delays; a fresh page load often hydrates state","Handle ErrNoFeedDetail as 'detail unavailable' and skip the note instead of failing the whole batch"],"exampleFix":"// before\ndetail, err := xhs.GetFeedDetail(ctx, noteID)\nif err != nil { return err }\n// after\ndetail, err := xhs.GetFeedDetail(ctx, noteID)\nif errors.Is(err, errors.ErrNoFeedDetail) {\n    log.Printf(\"note %s detail unavailable, skipping\", noteID)\n    return nil\n}","handlingStrategy":"try-catch","validationCode":"// Check note accessibility expectations first\nif noteID == \"\" { return fmt.Errorf(\"noteID required\") }","typeGuard":"func isNoFeedDetail(err error) bool { return errors.Is(err, errors.ErrNoFeedDetail) }","tryCatchPattern":"detail, err := xhs.GetFeedDetail(ctx, id)\nif errors.Is(err, errors.ErrNoFeedDetail) {\n    return nil // skip unavailable note\n} else if err != nil {\n    return err\n}","preventionTips":["Skip deleted/private notes gracefully","Refresh session cookies periodically","Screenshot page on failure to diagnose state extraction issues"],"tags":["scraping","empty-result","xiaohongshu"],"backgroundTag":"empty-scrape-result","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"}