{"record":{"id":"c7cf6e0e567ebdda","repo":"DIYgod/RSSHub","slug":"placename","errorCode":null,"errorMessage":"未找到 ${placeName} 的疫情数据，请检查输入的省市名称是否正确","messagePattern":"未找到 (.+?) 的疫情数据，请检查输入的省市名称是否正确","errorType":"validation","errorClass":"InvalidParameterError","httpStatus":null,"severity":"error","filePath":"lib/routes/tencent/news/coronavirus/data.tsx","lineNumber":54,"sourceCode":"\n    if (!province || province === '中国' || province === '全国') {\n        // 没有传参则取全国\n        coronavirusData = nationalData;\n        placeName = '中国';\n    } else {\n        // 分省份获取\n        coronavirusData = provinceList?.find((e) => e.name === province);\n        placeName = province;\n        if (city) {\n            // 继续获取 区县 数据\n            coronavirusData = coronavirusData?.children?.find((e) => e.name === city);\n            if (coronavirusData) {\n                placeName = `${province}-${city}`;\n            }\n        }\n    }\n    if (!coronavirusData) {\n        throw new InvalidParameterError(`未找到 ${placeName} 的疫情数据，请检查输入的省市名称是否正确`);\n    }\n    const todayConfirm = coronavirusData.today?.confirm;\n    const totalNowConfirm = coronavirusData.total?.nowConfirm;\n    const totalConfirm = coronavirusData.total?.confirm;\n    const totalDead = coronavirusData.total?.dead;\n    const pubDate = parseDate(coronavirusData.total?.mtime || lastUpdateTime);\n\n    const title = `${placeName} - 腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪`;\n\n    const info = {\n        title: `${placeName} - 疫情数据`,\n        description: renderToString(\n            <>\n                <p>新增确诊：</p>\n                <p>{`+${todayConfirm}`}</p>\n                <br />\n                <p>现有确诊：</p>\n                <p>{totalNowConfirm}</p>","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/tencent/news/coronavirus/data.tsx#L36-L72","documentation":"An `InvalidParameterError` thrown at lib/routes/tencent/news/coronavirus/data.tsx:54 when neither the province nor the city path parameter matches any entry in Tencent's diseaseh5Shelf `areaTree`. Matching is an exact string comparison (`e.name === province`) against Chinese-language names, so any transliteration or spacing difference fails. The data source is Tencent's real-time COVID tracker, which may have been discontinued or frozen.","triggerScenarios":"Passing 'Hubei' instead of '湖北'; passing a valid province but a city name that doesn't appear in that province's `children` array; passing a district name in the city slot for a municipality (直辖市的区县); the diseaseh5Shelf API stopped returning data so `provinceList` is undefined.","commonSituations":"User enters province/city in English or Pinyin; simplified vs. traditional Chinese mismatch; Tencent deprecated the COVID data endpoint so areaTree is empty; user tries a county-level name in the city field.","solutions":["Use the exact Chinese names as shown on the Tencent tracker dashboard (news.qq.com/zt2020/page/feiyan.htm), e.g. `/tencent/news/coronavirus/data/湖北/武汉`.","Omit the city parameter to get province-level data: `/tencent/news/coronavirus/data/湖北`.","Omit both province and city to get national data.","If the data source is dead, the route itself needs updating — check whether getData(['diseaseh5Shelf']) still returns a populated areaTree."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// validate Chinese province/city names before calling the route\nconst province = '湖北';\nconst knownProvinces = ['湖北', '广东', '河南', '浙江', '湖南', '安徽']; // consult Tencent dashboard\nif (province && !knownProvinces.includes(province)) {\n    console.warn('Province may not match Tencent data; use exact Chinese names');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always use simplified Chinese names exactly as they appear on the Tencent tracker dashboard.","Omit the city parameter first to verify the province name works, then add city.","For municipalities (直辖市), use district/county names in the city slot, not the municipality name again.","Be aware Tencent may have discontinued this data source — test with national data first."],"tags":["validation","parameters","chinese","coronavirus","deprecated"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}