{"record":{"id":"8a5d2936534b7bb5","repo":"DIYgod/RSSHub","slug":"response-data-message","errorCode":null,"errorMessage":"response.data.message","messagePattern":"response\\.data\\.message","errorType":"exception","errorClass":"InvalidParameterError","httpStatus":503,"severity":"warning","filePath":"lib/routes/bilibili/followings.ts","lineNumber":77,"sourceCode":"            Referer: `https://space.bilibili.com/${uid}/`,\n        },\n    });\n    const count = countResponse.data.data.following;\n\n    const response = await got({\n        method: 'get',\n        url: `https://api.bilibili.com/x/relation/followings?vmid=${uid}`,\n        headers: {\n            Referer: `https://space.bilibili.com/${uid}/`,\n            Cookie: cookie,\n        },\n    });\n    if (response.data.code === -6) {\n        throw new ConfigNotFoundError('对应 loginUid 的 Bilibili 用户的 Cookie 已过期');\n    }\n    // 22115 : 用户已设置隐私，无法查看\n    if (response.data.code === 22115) {\n        throw new InvalidParameterError(response.data.message);\n    }\n    const data = response.data.data.list;\n\n    return {\n        title: `${name} 的 bilibili 关注`,\n        link: `https://space.bilibili.com/${uid}/#/fans/follow`,\n        description: `${name} 的 bilibili 关注`,\n        item: data.map((item) => ({\n            title: `${name} 新关注 ${item.uname}`,\n            description: `${item.uname}<br>${item.sign}<br>总计${count}`,\n            pubDate: new Date(item.mtime * 1000),\n            link: `https://space.bilibili.com/${item.mid}`,\n        })),\n    };\n}\n","sourceCodeStart":59,"sourceCodeEnd":93,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/bilibili/followings.ts#L59-L93","documentation":"InvalidParametersError thrown by the followings route when Bilibili's relation/followings API returns code 22115, meaning the target user has set their following list to private. The error message is whatever Bilibili returns in response.data.message (typically '用户已设置隐私，无法查看'). This is not a bug — it reflects the target user's privacy settings.","triggerScenarios":"The queried uid (not loginUid) has enabled the privacy setting that hides their following list. Bilibili returns code 22115 with a message explaining the privacy restriction. No amount of cookie refreshing will fix this.","commonSituations":"Target user toggled 'hide following list' in their Bilibili privacy settings; trying to scrape a private/celebrity account that has locked down their social graph; the target was always private.","solutions":["Choose a different target uid whose following list is public.","Accept that this user's following list is not accessible via any authenticated route.","If you control the target account, disable the privacy setting in Bilibili account settings."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-check: test if the user's following list is accessible\n// (cannot truly validate without calling the API, but inform the user)\nif (response.data.code === 22115) {\n    throw new InvalidParametersError(\n        `User ${uid} has set their following list to private. This cannot be bypassed.`\n    );\n}","typeGuard":null,"tryCatchPattern":"try {\n    const response = await got({...});\n    if (response.data.code === 22115) {\n        throw new InvalidParametersError('Target user following list is private');\n    }\n} catch (e) {\n    if (e instanceof InvalidParametersError) {\n        // Inform user — no technical fix available\n    }\n    throw e;\n}","preventionTips":["Test target uids manually before subscribing.","Understand that privacy settings are not bypassable.","Choose users with public following lists."],"tags":["bilibili","privacy","invalid-parameters","user-settings","rsshub"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}