{"record":{"id":"85d9a269f302a403","repo":"DIYgod/RSSHub","slug":"error-85d9a2","errorCode":null,"errorMessage":"软件信息不存在，请报告这个问题","messagePattern":"软件信息不存在，请报告这个问题","errorType":"validation","errorClass":"InvalidParameterError","httpStatus":503,"severity":"error","filePath":"lib/routes/nintendo/eshop-cn.ts","lineNumber":46,"sourceCode":"\n    // 获取Nuxt对象\n    const result = (await util.nuxtReader(response.data)) as Record<string, any>;\n\n    /* expectedReleaseNS[]\n        coverImageUrl: \"//switch-cn.gtgres.com/global-images/c50e3390-14e5-11ea-9b40-236e671bca9e.png\"\n        expectedReleaseDate: 0\n        expectedReleaseDateFuzzy: \"\"\n        gameName: \"Mario Tennis Aces\"\n        id: 1852\n        newsPageUrl: \"\"\n      recentSoftwareList[]\n        imgUrl: \"https://metadata-images.nintendoswitch.com.cn/formal/8332803007012-1F2B121D-743F-B868-5595-35C79BB2A817-KV.jpg\"\n        jumpUrl: \"https://www.nintendoswitch.com.cn/awuxa/index.html\"\n        publishTime: \"2022.10.31\"\n        title: \"附带导航！一做就上手 第一次的游戏程序设计\"\n    */\n    if (!result.recentSoftwareList) {\n        throw new InvalidParameterError('软件信息不存在，请报告这个问题');\n    }\n\n    let data = result.recentSoftwareList.map((item) => ({\n        title: item.title,\n        description: util.generateImageLink(item.imgUrl),\n        link: item.jumpUrl.startsWith('http') ? item.jumpUrl : `${software_url}${item.jumpUrl}`,\n        pubDate: parseDate(item.publishTime, 'YYYY.MM.DD'),\n    }));\n\n    data = await util.ProcessItemChina(data, cache);\n\n    return {\n        title: 'Nintendo eShop（国服）新游戏',\n        link: 'https://www.nintendoswitch.com.cn/software',\n        description: 'Nintendo（国服）新上架的游戏',\n        item: data,\n    };\n}","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/nintendo/eshop-cn.ts#L28-L64","documentation":"An InvalidParameterError from the Nintendo eShop CN route. After fetching the page and extracting Nuxt data via util.nuxtReader, the handler checks result.recentSoftwareList; if absent it concludes the Nuxt payload did not contain the expected software listing and throws. Despite the 'InvalidParameter' type, the real cause is almost always upstream structure change, not a bad user parameter.","triggerScenarios":"The Nuxt payload parses (so nuxtReader did not throw) but the recentSoftwareList key is missing — the page returned a different payload (empty listing, error state, a redesigned data shape), or nuxtReader returned the wrong data index. Also possible during regional outages or when the list is temporarily empty.","commonSituations":"Nintendo CN restructures the Nuxt payload; the page is in a maintenance/error state that still parses as Nuxt but lacks the software list; nuxtReader picks __NUXT__.data[0] but the relevant data moved to another index.","solutions":["Open the eShop CN URL in a browser and inspect window.__NUXT__ to confirm whether recentSoftwareList still exists and at which data index.","If the key was renamed, update the check and the subsequent map() in the handler.","If the list is genuinely empty (no current software), consider returning an empty feed rather than throwing InvalidParameterError.","Report the structure change to the route maintainers."],"exampleFix":"// before\nif (!result.recentSoftwareList) {\n    throw new InvalidParameterError('软件信息不存在，请报告这个问题');\n}\n\n// after — distinguish missing-key from empty-list\nif (!result.recentSoftwareList) {\n    throw new Error('eShop CN: recentSoftwareList missing from Nuxt payload (page structure changed)');\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"const hasRecentSoftwareList = (r: any): r is { recentSoftwareList: any[] } =>\n  !!r && Array.isArray(r.recentSoftwareList);","tryCatchPattern":"try {\n  const result: any = await util.nuxtReader(response.data);\n  if (!result.recentSoftwareList) throw new Error('eShop CN: recentSoftwareList missing — page structure changed');\n} catch (e) {\n  // either Nuxt extraction failed (409) or the key drifted — report to maintainers\n}","preventionTips":["Decouple 'key missing' from 'list empty' — return an empty feed for genuine emptiness rather than throwing.","Pin nuxtReader to the correct data index after confirming against the live page.","Add a structure assertion that fails fast with a clear message."],"tags":["nuxt","scraping","nintendo","upstream"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}