{"record":{"id":"4521b3139b09ed9b","repo":"DIYgod/RSSHub","slug":"error-4521b3","errorCode":null,"errorMessage":"新闻信息不存在，请报告这个问题","messagePattern":"新闻信息不存在，请报告这个问题","errorType":"validation","errorClass":"InvalidParameterError","httpStatus":503,"severity":"error","filePath":"lib/routes/nintendo/news-china.ts","lineNumber":47,"sourceCode":"    maintainers: ['NeverBehave'],\n    handler,\n    url: 'nintendoswitch.com.cn/',\n};\n\nasync function handler() {\n    const response = await got(news_url);\n\n    // 获取Nuxt对象\n    const result: any = await util.nuxtReader(response.data);\n\n    /* newsList[]\n        imgUrl: \"https://metadata-images.nintendoswitch.com.cn/formal/8332123215251-EAFBA647-9772-DB4B-3C1A-FE0CC41A3966-封面图(1).jpg\"\n        jumpUrl: \"0691bb11-e6a0-4e8c-9b0b-80470ec0a939\"\n        publishTime: \"2022.11.08 11:30:00\" // 1667878200000\n        title: \"8款新品开启预约：超级马力欧系列官方周边\"\n    */\n    if (!result.newsList) {\n        throw new InvalidParameterError('新闻信息不存在，请报告这个问题');\n    }\n\n    let data = result.newsList.map((item) => ({\n        title: item.title,\n        description: util.generateImageLink(item.imgUrl),\n        link: `${news_url}/topics/${item.jumpUrl}`,\n    }));\n\n    data = await util.ProcessNewsChina(data, cache);\n\n    return {\n        title: 'Nintendo（中国大陆）主页资讯',\n        link: 'https://www.nintendoswitch.com.cn',\n        description: 'Nintendo 中国大陆官网刊登的资讯',\n        item: data,\n    };\n}\n","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/nintendo/news-china.ts#L29-L65","documentation":"Sibling guard to 407, in the Nintendo CN news route. After nuxtReader extracts the payload, the handler requires result.newsList; absence throws InvalidParameterError with a 'report this' message. Same root cause as 407: upstream Nuxt payload changed shape or the page is in an error state.","triggerScenarios":"The news page's __NUXT__ payload lacks newsList — redesign, maintenance page, regional content change, or nuxtReader returning the wrong data index. Distinct from 409 (which fires when Nuxt extraction itself fails).","commonSituations":"Nintendo CN ships a redesign that renames newsList; the page serves a cached/error payload that still parses as Nuxt; data index drift in nuxtReader.","solutions":["Inspect window.__NUXT__ on the live news URL to confirm newsList key name and data index.","Update the key name / index if it drifted.","If the list is legitimately empty, return an empty feed instead of throwing.","Report upstream to route maintainers."],"exampleFix":"// before\nif (!result.newsList) {\n    throw new InvalidParameterError('新闻信息不存在，请报告这个问题');\n}\n\n// after\nif (!result.newsList) {\n    throw new Error('Nintendo CN news: newsList missing from Nuxt payload (structure changed)');\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"const hasNewsList = (r: any): r is { newsList: any[] } =>\n  !!r && Array.isArray(r.newsList);","tryCatchPattern":"try {\n  const result: any = await util.nuxtReader(response.data);\n  if (!result.newsList) throw new Error('Nintendo CN news: newsList missing — structure changed');\n} catch (e) {\n  // report upstream; consider empty-feed fallback\n}","preventionTips":["Confirm the newsList key name and data index against window.__NUXT__ on the live page.","Distinguish missing-key from empty list in the error message.","Centralize Nuxt shape assumptions in one util so a fix applies to both news and eshop routes."],"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"}