{"record":{"id":"8ce3efac0061ef1f","repo":"DIYgod/RSSHub","slug":"error-8ce3ef","errorCode":null,"errorMessage":"未获取到数据！","messagePattern":"未获取到数据！","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/routes/mihoyo/bbs/img-ranking.ts","lineNumber":135,"sourceCode":"    }\n    const { cate_id, title: cate_title } = getCateInfo(game, forum_type, cate_type);\n    const { id: type, title: type_title } = getRankingTypeInfo(game, ranking_type);\n    const query = new URLSearchParams({\n        gids,\n        forum_id,\n        cate_id,\n        type,\n        page_size,\n        last_id,\n    }).toString();\n    const url = `https://bbs-api.miyoushe.com/post/wapi/getImagePostList?${query}`;\n    const response = await got({\n        method: 'get',\n        url,\n    });\n    const list = response?.data?.data?.list;\n    if (!list) {\n        throw new Error('未获取到数据！');\n    }\n    const title = `米游社-${game_title}-${forum_title}${cate_title ? `-${cate_title}` : ''}-${type_title}`;\n    const items = list.map((e) => post2item(e));\n    const data = {\n        title,\n        link: url,\n        item: items,\n    };\n    return data;\n}\n","sourceCodeStart":117,"sourceCodeEnd":146,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/mihoyo/bbs/img-ranking.ts#L117-L146","documentation":"Generic Error ('No data retrieved!') thrown when the Miyoushe image-ranking API returns HTTP 200 but response.data.data.list is missing. The upstream call succeeded but the expected list array is absent — typically an empty result for that ranking/cate combination or an upstream envelope change.","triggerScenarios":"got(getImagePostList) resolves, but response.data.data.list is falsy. Happens when cate_id/ranking_type combination yields no posts, the game's ranking is temporarily empty, or the API returned an error envelope with HTTP 200.","commonSituations":"Asking for a weekly/monthly ranking that hasn't been populated yet; an invalid cate_type for that forum; upstream transient error; API envelope changed.","solutions":["Try the default rankingType=daily and cateType=illustration to confirm the route works for that game.","Retry after a few minutes in case of a transient empty response.","Verify cateType is valid for the game/forum combination (see route description table).","If persistent, report an envelope change to maintainers."],"exampleFix":"// before\n// /mihoyo/bbs/img-ranking/ys/forumType=tongren&cateType=qute&rankingType=daily\n\n// after\n// /mihoyo/bbs/img-ranking/ys/forumType=tongren&cateType=illustration&rankingType=daily","handlingStrategy":"retry","validationCode":"// Validate combination shape before calling API\nconst { cate_id } = getCateInfo(game, forum_type, cate_type);\nif (!cate_id) throw new Error('Invalid cateType for this game/forum');","typeGuard":"function hasRankingList(res: any): boolean {\n    return Array.isArray(res?.data?.data?.list);\n}","tryCatchPattern":"try {\n    const list = response?.data?.data?.list;\n    if (!list) throw new Error('No ranking data yet — retry later');\n} catch (e) { /* retry or return allowEmpty */ }","preventionTips":["Retry weekly/monthly rankings that may be temporarily empty.","Default to daily/illustration which is most populated.","Return allowEmpty feeds instead of hard-failing for resilience."],"tags":["mihoyo","upstream","validation","retry"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}