{"record":{"id":"d87de8620138bf9a","repo":"DIYgod/RSSHub","slug":"jiangsu-cannot-find-page","errorCode":null,"errorMessage":"Jiangsu, Cannot find page","messagePattern":"Jiangsu, Cannot find page","errorType":"exception","errorClass":null,"httpStatus":503,"severity":"warning","filePath":"lib/routes-deprecated/gov/province/jiangsu/index.js","lineNumber":61,"sourceCode":"            break;\n        case 'opinion-collection':\n            cid = 31344;\n            uid = 158542;\n            break;\n        case 'annual-report':\n            cid = 31251;\n            uid = 300520;\n            break;\n        case 'information-publicity':\n            cid = 31319;\n            uid = 158542;\n            break;\n        default:\n            logger.error('URL pattern not matched');\n    }\n\n    if (cid === '') {\n        throw new Error('Jiangsu, Cannot find page');\n    }\n\n    const responseData = await getContent(homePage, cid, uid, TOTAL_PAGE);\n    return responseData;\n};\n","sourceCodeStart":43,"sourceCodeEnd":67,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes-deprecated/gov/province/jiangsu/index.js#L43-L67","documentation":"Thrown by the Jiangsu provincial government route helper (deprecated) when category matches no switch case. The default branch only logs and leaves cid as ''; the `if (cid === '')` guard then throws 'Jiangsu, Cannot find page'. Valid cases: executive-meeting, important-news, department, city-county, documentation, policy-interpretation, normative-document, legislative-opinion-collection, opinion-collection, annual-report, information-publicity.","triggerScenarios":"Calling the helper with a category outside the eleven supported cases; cid stays empty and the post-switch check throws.","commonSituations":"Slug typo, or caller forwarding a category intended for a different province's helper. The empty-string sentinel design means any future case that legitimately needs cid=0 would be misclassified.","solutions":["Use one of the eleven documented categories (e.g. information-publicity, important-news).","Verify the calling route forwards only supported categories to this helper.","Add a switch case with the correct cid/uid pair from the source site if a new category is genuinely needed."],"exampleFix":"// before\nswitch ('info-publicity')   // no case matches\n// after\nswitch ('information-publicity')","handlingStrategy":"validation","validationCode":"const VALID = ['executive-meeting','important-news','department','city-county','documentation','policy-interpretation','normative-document','legislative-opinion-collection','opinion-collection','annual-report','information-publicity'];\nif (!VALID.includes(category)) throw new Error(`Invalid Jiangsu category. Valid: ${VALID.join(', ')}`);","typeGuard":"const isJiangsuCategory = (v: string): v is 'executive-meeting' | 'important-news' | 'department' | 'city-county' | 'documentation' | 'policy-interpretation' | 'normative-document' | 'legislative-opinion-collection' | 'opinion-collection' | 'annual-report' | 'information-publicity' => VALID.includes(v);","tryCatchPattern":"try { await getContent(homePage, category); }\ncatch (e) { if (/Cannot find page/.test(e.message)) return safeEmpty(); else throw e; }","preventionTips":["The cid='' sentinel is fragile; validate explicitly upstream.","Don't forward categories from other provinces' helpers."],"tags":["rsshub","parameter-validation","deprecated-route","government","control-flow"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}