DIYgod/RSSHub · error · Error
未获取到数据!
Error message
未获取到数据!
What it means
Generic Error ('No data retrieved!') thrown by the follow-list route when response.data.data.result is missing. The Miyoushe following API returned HTTP 200 but the expected 'result' array is absent — usually an auth or rate-limit envelope.
Source
Thrown at lib/routes/mihoyo/bbs/follow-list.ts:46
const searchParams = {
gids: 2,
uid,
page_size,
};
const link = `https://www.miyoushe.com/ys/accountCenter/followList?id=${uid}`;
const url = 'https://bbs-api.miyoushe.com/user/wapi/following';
const response = await got({
method: 'get',
url,
searchParams,
headers: {
Origin: 'https://www.miyoushe.com',
Referer: link,
},
});
const list = response?.data?.data?.result;
if (!list) {
throw new Error('未获取到数据!');
}
const { nickname: username } = await cache.getUserFullInfo(ctx, uid);
const title = `米游社 - ${username} 的关注`;
const items = list.map((e) => {
const title = e.user.nickname;
const link = `https://www.miyoushe.com/ys/accountCenter/postList?id=${e.user.uid}`;
const description = renderDescription(`${e.user.certification.label || ''}\n${e.user.introduce || ''}`.trim(), [e.user.avatar_url]);
return {
title,
link,
description,
};
});
const data = {
title,
link,
item: items,View on GitHub (pinned to bed535e087)
Solutions
- Refresh MIHOYO_COOKIE with a fresh login.
- Confirm the uid has followings visible on miyoushe.com.
- Wait and retry if rate-limited.
- If the envelope changed, report to the route maintainer.
Example fix
// before MIHOYO_COOKIE=expired // after MIHOYO_COOKIE=account_id=...; cookie_token=...fresh...
Defensive patterns
Strategy: retry
Validate before calling
if (!config.mihoyo.cookie) throw new ConfigNotFoundError('MIHOYO_COOKIE missing for follow-list'); Type guard
function hasFollowResult(res: any): boolean {
return Array.isArray(res?.data?.data?.result);
} Try / catch
try {
const list = response?.data?.data?.result;
if (!list) throw new Error('No data from Miyoushe');
} catch (e) { /* refresh cookie / retry */ throw e; } Prevention
- Refresh MIHOYO_COOKIE periodically.
- Retry on transient empty responses.
- Alert on sustained failures pointing to cookie expiry.
When it happens
Trigger: got(following) resolves, but response.data.data.result is falsy. Typically: invalid cookie returns an unauthenticated envelope; uid has zero followings in an edge format; upstream API shape changed; rate limit returns an error envelope.
Common situations: Expired/invalid MIHOYO_COOKIE; uid is private or has no followings; Miyoushe rate-limited the IP; API envelope changed after a site update.
Related errors
- 未获取到数据!
- GetUserFullInfo is not available due to the absense of [Miyo
- 未获取到数据!
- mihoyo/bbs/official: getPostContent failed: ${url} - ${JSON.
- Miyoushe Timeline is not available due to the absense of [Mi
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/feab3c02c5b3d5b8.
Report an issue: GitHub.