{"record":{"id":"cb5b600fb55b34d9","repo":"DIYgod/RSSHub","slug":"error-cb5b60","errorCode":null,"errorMessage":"未获取到数据！","messagePattern":"未获取到数据！","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/routes/mihoyo/bbs/cache.ts","lineNumber":28,"sourceCode":"    uid ||= '';\n    const key = 'mihoyo:user-full-info-uid-' + uid;\n    return cache.tryGet(key, async () => {\n        const query = new URLSearchParams({\n            uid,\n            gids: '2',\n        }).toString();\n        const url = `https://bbs-api.miyoushe.com/user/wapi/getUserFullInfo?${query}`;\n        const response = await got({\n            method: 'get',\n            url,\n            headers: {\n                Referer: `https://www.miyoushe.com/ys/accountCenter/postList?id=${uid}`,\n                Cookie: config.mihoyo.cookie,\n            },\n        });\n        const userInfo = response?.data?.data?.user_info;\n        if (!userInfo) {\n            throw new Error('未获取到数据！');\n        }\n        const { nickname, introduce, gender, certification, avatar_url, uid: userId } = userInfo;\n        return {\n            nickname,\n            introduce,\n            gender,\n            certification,\n            avatar_url,\n            uid: userId,\n        };\n    });\n};\n\nexport default { getUserFullInfo };\n","sourceCodeStart":10,"sourceCodeEnd":43,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/mihoyo/bbs/cache.ts#L10-L43","documentation":"Generic Error ('未获取到数据！' = 'No data retrieved!') thrown when the Miyoushe getUserFullInfo API returns a response whose data.data.user_info is missing. The upstream call succeeded at the HTTP level but the payload lacks the expected user_info object — typically an auth or invalid-uid response from Miyoushe.","triggerScenarios":"got(getUserFullInfo) resolves, but response.data.data.user_info is falsy. Common when the cookie is invalid (Miyoushe returns a logged-out payload), the uid doesn't exist, or the API shape changed.","commonSituations":"Invalid/expired MIHOYO_COOKIE so Miyoushe returns an unauthenticated envelope; uid refers to a deleted account; miyoushe changed its response envelope; transient API error returning an error body with HTTP 200.","solutions":["Refresh MIHOYO_COOKIE from a fresh miyoushe.com login.","Verify the uid is a real Miyoushe user id (numeric, from the accountCenter URL).","If persistent across valid cookies, the API envelope changed — report to route maintainers.","Retry once; transient 200-with-error does happen."],"exampleFix":"// before\nMIHOYO_COOKIE=stale_or_empty\n\n// after\nMIHOYO_COOKIE=account_id=12345; cookie_token=valid_token; ltoken=...","handlingStrategy":"retry","validationCode":"// Validate the cookie is set before calling\nif (!config.mihoyo.cookie) throw new ConfigNotFoundError('MIHOYO_COOKIE missing');","typeGuard":"function hasUserInfo(res: any): res is { data: { data: { user_info: object } } } {\n    return Boolean(res?.data?.data?.user_info);\n}","tryCatchPattern":"try {\n    const userInfo = response?.data?.data?.user_info;\n    if (!userInfo) throw new Error('No data from Miyoushe');\n} catch (e) {\n    // refresh cookie / retry once","preventionTips":["Keep MIHOYO_COOKIE fresh.","Retry once on empty-data responses.","Log the retcode field from Miyoushe responses for diagnosis."],"tags":["mihoyo","auth","upstream","data-integrity"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}