{"record":{"id":"b5f3a873c7b67ba4","repo":"DIYgod/RSSHub","slug":"the-column-columnparam-does-not-exist","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/college/csse.ts","lineNumber":40,"sourceCode":"    },\n    '2437': {\n        title: '学术动态',\n        description: '计算机科学与工程 学术动态',\n    },\n    '2446': {\n        title: '研究生招生',\n        description: '计算机科学与工程学院 研究生招生动态及相关新闻',\n    },\n    '8411': {\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://jsj.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 = 'ul > li.clearfix';\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('div.right_list_text > p.p1 > a').text()!;\n        const imgRelativeLink = $(element).find('div.right_list_img > a > img').attr('src') || WEBSITE_LOGO;\n        const img = new URL(imgRelativeLink, BASE_URL).href;","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/nwnu/routes/college/csse.ts#L22-L58","documentation":"Thrown as a `NotFoundError` (HTTP 404) when the `column` path parameter for the NWNU (Northwest Normal University) Computer Science college route is not a key in the `COLUMNS` object. The COLUMNS map defines supported column IDs (like those for '研究生招生' and '评估动态') with title and description metadata. The column value is used to build the list page URL `https://jsj.nwnu.edu.cn/${columnParam}/list.htm`.","triggerScenarios":"Requesting `/nwnu/...` with a column parameter that doesn't match any key in COLUMNS (e.g., a non-existent numeric column ID). The column value becomes a path segment in the scraped URL.","commonSituations":"User passes an arbitrary column number not in the COLUMNS map. The college website restructured its column numbering. A bookmarked or radar URL references an outdated column ID.","solutions":["Use only the column IDs defined in the COLUMNS object in `lib/routes/nwnu/routes/college/csse.ts`.","Browse `https://jsj.nwnu.edu.cn/` to find valid column IDs from the navigation.","If the college added a new column, add it to the COLUMNS object."],"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 from the COLUMNS object.","Browse the live college website to verify column path segments.","Keep COLUMNS entries updated when the 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"}