{"record":{"id":"16f6b0b72f1a22e0","repo":"DIYgod/RSSHub","slug":"error-16f6b0","errorCode":null,"errorMessage":"该用户已设置收藏内容不可见","messagePattern":"该用户已设置收藏内容不可见","errorType":"validation","errorClass":"InvalidParameterError","httpStatus":503,"severity":"error","filePath":"lib/routes/xiaohongshu/user.ts","lineNumber":115,"sourceCode":"    const image = basicInfo.imageb || basicInfo.images;\n\n    const renderNote = (notes) =>\n        notes.flatMap((n) =>\n            n.map(({ noteCard }) => {\n                const coverUrl = noteCard.cover.infoList.pop().url;\n                return {\n                    title: noteCard.displayTitle,\n                    link: coverUrl,\n                    guid: noteCard.displayTitle,\n                    description: `<img src=\"${coverUrl}\" width=\"${noteCard.cover.width}\" height=\"${noteCard.cover.height}\"><br>${noteCard.displayTitle}`,\n                    author: noteCard.user.nickname,\n                    upvotes: noteCard.interactInfo.likedCount,\n                };\n            })\n        );\n    const renderCollect = (collect) => {\n        if (!collect) {\n            throw new InvalidParameterError('该用户已设置收藏内容不可见');\n        }\n        if (collect.code !== 0) {\n            throw new Error(JSON.stringify(collect));\n        }\n        if (!collect.data.notes.length) {\n            throw new InvalidParameterError('该用户已设置收藏内容不可见');\n        }\n        return collect.data.notes.map((item) => ({\n            title: item.display_title,\n            link: `${url}/${item.note_id}`,\n            description: `<img src =\"${item.cover.info_list.pop().url}\"><br>${item.display_title}`,\n            author: item.user.nickname,\n            upvotes: item.interact_info.likedCount,\n        }));\n    };\n\n    return {\n        title,","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/xiaohongshu/user.ts#L97-L133","documentation":"InvalidParameterError thrown in renderCollect when collect is falsy. collect is '' (empty string) by default — set in util.ts when the proxy path is used (which cannot fetch collect) or when the Playwright click/waitForResponse for the collect API fell into its own catch and left collect as ''. So the route could not obtain the collections feed at all.","triggerScenarios":"category === 'collect' and the collect payload is empty: either XIAOHONGSHU proxy is configured (collect unsupported without Playwright) or the Playwright collect-fetch try/catch at util.ts:95-107 failed silently.","commonSituations":"Operator set config.xiaohongshu.proxy (proxy path never yields collect); the collect XHR timed out under Playwright; user is not logged in so the collect tab is unreachable.","solutions":["Do not use the proxy path for the collect category — ensure Playwright is available so util.ts can click the collect tab.","Retry; if the collect XHR timed out it may succeed on the next run.","Confirm the target user actually has a public collect tab (see error 638 for the private case)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Detect the unsupported-proxy-for-collect case before calling renderCollect\nif (category === 'collect' && config.xiaohongshu.proxy && !config.xiaohongshu.cookie) {\n    throw new InvalidParameterError('collect category requires Playwright (no proxy) or a logged-in cookie');\n}","typeGuard":"function isCollectUnavailableError(e: unknown): boolean {\n    return e instanceof Error && e.name === 'InvalidParameterError' && /收藏内容不可见/.test(e.message);\n}","tryCatchPattern":"try {\n    return renderCollect(collect);\n} catch (e) {\n    if (isCollectUnavailableError(e)) {\n        // Distinguish 'no data fetched' (636) from 'private' (638) for the user\n        return ctx.json({ error: 'Collect data unavailable — retry or use the notes category.' }, 503);\n    }\n    throw e;\n}","preventionTips":["Do not enable the proxy path if you need collect feeds — it cannot fetch them.","Ensure Playwright is healthy so the collect XHR has a chance to succeed.","Retry once on the empty-collect case before declaring failure."],"tags":["xiaohongshu","invalid-parameter","playwright","proxy","collect"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}