{"record":{"id":"bc9989b6f6e53c37","repo":"DIYgod/RSSHub","slug":"error-bc9989","errorCode":null,"errorMessage":"不支持指定类型！","messagePattern":"不支持指定类型！","errorType":"exception","errorClass":"InvalidParameterError","httpStatus":null,"severity":"error","filePath":"lib/routes/dlsite/new.ts","lineNumber":88,"sourceCode":"        antiCrawler: false,\n        supportBT: false,\n        supportPodcast: false,\n        supportScihub: false,\n        nsfw: true,\n    },\n    name: 'Current Release',\n    maintainers: ['cssxsh'],\n    handler,\n    description: `| Doujin | Comics | PC Games | Doujin (R18) | Adult Comics | H Games | Otome | BL |\n| ------ | ------ | -------- | ------------ | ------------ | ------- | ----- | -- |\n| home   | comic  | soft     | maniax       | books        | pro     | girls | bl |`,\n};\n\nasync function handler(ctx) {\n    const info = infos[ctx.req.param('type')];\n    // 判断参数是否合理\n    if (info === undefined) {\n        throw new InvalidParameterError('不支持指定类型！');\n    }\n\n    const link = info.url.slice(1);\n\n    const response = await got(new URL(link, host), {\n        method: 'GET',\n    });\n    const data = response.data;\n    const $ = load(data);\n\n    const title = $('title').text();\n    const description = $('meta[name=\"description\"]').attr('content');\n    const list = $('.n_worklist_item');\n    const dateText = $('.work_update')\n        .text()\n        .trim()\n        .replaceAll(/（.*）/g, '');\n    const pubDate = parseDate(dateText, 'YYYY年M月D日');","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/dlsite/new.ts#L70-L106","documentation":"Thrown by the DLsite new/current release route when the `type` path parameter does not match any key in the `infos` lookup object. Valid keys are: `home`, `comic`, `soft`, `maniax`, `books`, `pro`, `girls`, `bl`. Identical validation pattern to the campaign route but for the 'new releases' feed.","triggerScenarios":"Calling /dlsite/new/<type> with a type not in the infos table; typos; case mismatch (keys are lowercase); using a deprecated or renamed category name.","commonSituations":"Developer refers to outdated docs listing different type names; user tries a category name from the DLsite UI that differs from the route's internal key.","solutions":["Refer to the route description table for valid values: home, comic, soft, maniax, books, pro, girls, bl.","Ensure the parameter is lowercase.","Confirm the route path: /dlsite/new/<type> (e.g. /dlsite/new/maniax)."],"exampleFix":"// before\nconst info = infos[ctx.req.param('type')];\nif (info === undefined) {\n    throw new InvalidParameterError('不支持指定类型！');\n}\n\n// after\nif (info === undefined) {\n    throw new InvalidParameterError(`Unsupported type '${ctx.req.param('type')}'. Valid: ${Object.keys(infos).join(', ')}`);\n}","handlingStrategy":"validation","validationCode":"const validTypes = ['home', 'comic', 'soft', 'maniax', 'books', 'pro', 'girls', 'bl'];\nfunction isValidDlsiteNewType(type: string): boolean {\n    return validTypes.includes(type.toLowerCase());\n}","typeGuard":"function isDlsiteNewType(value: string): value is 'home' | 'comic' | 'soft' | 'maniax' | 'books' | 'pro' | 'girls' | 'bl' {\n    return ['home', 'comic', 'soft', 'maniax', 'books', 'pro', 'girls', 'bl'].includes(value);\n}","tryCatchPattern":"try {\n    const feed = await fetch(`${rsshubUrl}/dlsite/new/${type}`);\n} catch (e) {\n    if (e.message.includes('不支持指定类型')) {\n        console.error(`Invalid type '${type}'. Valid: home, comic, soft, maniax, books, pro, girls, bl`);\n    }\n    throw e;\n}","preventionTips":["Always lowercase the type parameter.","Cross-check with the route description table before subscribing.","Use the same type values as the campaign route since both share the infos structure."],"tags":["dlsite","invalid-parameter","parameter-validation","lookup-table"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}