{"record":{"id":"d39794d5213aa651","repo":"DIYgod/RSSHub","slug":"the-column-columnparam-does-not-exist-d39794","errorCode":null,"errorMessage":"The column ${columnParam} does not exist","messagePattern":"The column (.+?) does not exist","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"warning","filePath":"lib/routes/nwnu/routes/department/postgraduate.ts","lineNumber":48,"sourceCode":"    },\n    '2702': {\n        title: '培养工作',\n        description: '培养工作栏目信息汇总',\n    },\n    '2703': {\n        title: '学科建设',\n        description: '研究生院学科建设信息汇总',\n    },\n    '2704': {\n        title: '学位工作',\n        description: '研究生院学位工作栏目信息汇总',\n    },\n};\n\nconst handler: Route['handler'] = async (ctx) => {\n    const columnParam = ctx.req.param('column')!;\n    if (COLUMNS[columnParam] === undefined) {\n        throw new NotFoundError(`The column ${columnParam} does not exist`);\n    }\n    const columnTitle = COLUMNS[columnParam].title;\n    const columnDescription = COLUMNS[columnParam].description;\n    const columnPageUrl = `https://yjsy.nwnu.edu.cn/${columnParam}/list.htm`;\n\n    // Fetch the list page\n    const { data: listResponse } = await got(columnPageUrl);\n    const $ = load(listResponse);\n\n    // Select all list items containing academic information\n    const ITEM_SELECTOR = '#AjaxList > ul > li.a-list';\n    const listItems = $(ITEM_SELECTOR);\n\n    // Map through each list item to extract details\n    const itemLinks = listItems.toArray().map((element) => {\n        const title = $(element).find('a:nth-child(2)').attr('title')!;\n        const date = parseDate($(element).find('span.pdate').text()!);\n        const relativeLink = $(element).find('a:nth-child(2)').attr('href')!;","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/nwnu/routes/department/postgraduate.ts#L30-L66","documentation":"Thrown as a `NotFoundError` (HTTP 404) when the `column` path parameter for the NWNU Postgraduate Affairs route is not a key in the `COLUMNS` object. The supported columns include numeric string keys like those for '学科建设' (e.g., '2703') and '学位工作' ('2704'). The column value is used to build `https://yjsy.nwnu.edu.cn/${columnParam}/list.htm`.","triggerScenarios":"Requesting the NWNU postgraduate route with a column value that doesn't match any key in COLUMNS (e.g., a numeric column ID not among the predefined set).","commonSituations":"User passes an unsupported numeric column ID. The graduate school website restructured its column numbering. A radar rule references an outdated column.","solutions":["Use only the column IDs defined in COLUMNS in `lib/routes/nwnu/routes/department/postgraduate.ts` (e.g., '2703', '2704').","Browse `https://yjsy.nwnu.edu.cn/` to find valid column path segments from navigation.","Add new column entries to COLUMNS if the department added sections."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate column against COLUMNS keys\nconst validColumns = new Set(Object.keys(COLUMNS));\nif (!validColumns.has(columnParam)) {\n    throw new NotFoundError(\n        `The column ${columnParam} does not exist. Valid columns: ${[...validColumns].join(', ')}`\n    );\n}","typeGuard":"function isValidColumn(column: string, columns: Record<string, unknown>): column is string {\n    return Object.hasOwn(columns, column);\n}","tryCatchPattern":null,"preventionTips":["Use only column IDs defined in COLUMNS (e.g., '2703', '2704').","Verify column IDs by browsing yjsy.nwnu.edu.cn.","Update COLUMNS when the postgraduate site restructures."],"tags":["validation","nwnu","not-found","chinese-site","university"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}