{"record":{"id":"2e51fd41fba11ab3","repo":"DIYgod/RSSHub","slug":"type","errorCode":null,"errorMessage":"暂不支持对${type}的订阅","messagePattern":"暂不支持对(.+?)的订阅","errorType":"validation","errorClass":"InvalidParameterError","httpStatus":503,"severity":"warning","filePath":"lib/routes/bangumi.tv/subject/index.ts","lineNumber":55,"sourceCode":"    const id = ctx.req.param('id');\n    const type = ctx.req.param('type') || 'ep';\n    const showOriginalName = queryToBoolean(ctx.req.param('showOriginalName'));\n    let response;\n    switch (type) {\n        case 'ep':\n            response = await getEps(id, showOriginalName);\n            break;\n        case 'comments':\n            response = await getComments(id, Number(ctx.req.query('minLength')) || 0);\n            break;\n        case 'blogs':\n            response = await getFromAPI('blog')(id, showOriginalName);\n            break;\n        case 'topics':\n            response = await getFromAPI('topic')(id, showOriginalName);\n            break;\n        default:\n            throw new InvalidParameterError(`暂不支持对${type}的订阅`);\n    }\n    return response;\n}\n","sourceCodeStart":37,"sourceCodeEnd":59,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/bangumi.tv/subject/index.ts#L37-L59","documentation":"InvalidParameterError thrown by the bangumi.tv subject index route's switch on the :type parameter. Implemented cases are episodes, comments, blogs, topics; any other type falls into default and is rejected with a Chinese message ('subscription for {type} is not yet supported').","triggerScenarios":"Requesting the route with a type value outside {episodes, comments, blogs, topics}, e.g. 'reviews', 'characters', or a typo like 'comment'.","commonSituations":"User assumes every Bangumi subject tab has a feed; outdated example URL; new Bangumi feature requested but not implemented.","solutions":["Use one of the implemented types: episodes, comments, blogs, topics.","To add support, implement the fetcher and add a case branch before default."],"exampleFix":"// before\ndefault:\n    throw new InvalidParameterError(`暂不支持对${type}的订阅`);\n\n// after: list supported types in the message\nconst SUPPORTED = ['episodes', 'comments', 'blogs', 'topics'];\nif (!SUPPORTED.includes(type)) {\n    throw new InvalidParameterError(`Unsupported type: ${type}. Supported: ${SUPPORTED.join(', ')}`);\n}","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['episodes', 'comments', 'blogs', 'topics'] as const;\nif (!SUPPORTED.includes(type)) {\n    throw new InvalidParameterError(`Unsupported type: ${type}. Supported: ${SUPPORTED.join(', ')}`);\n}","typeGuard":"const SUPPORTED_TYPES = new Set(['episodes', 'comments', 'blogs', 'topics']);\nfunction isSupportedType(v: string): boolean {\n    return SUPPORTED_TYPES.has(v);\n}","tryCatchPattern":null,"preventionTips":["Convert the switch default into an explicit allow-list check so the supported set is one declaration.","Use InvalidParameterError to map the failure to a 400-style response."],"tags":["bangumi","input-validation","unsupported-feature","route-parameter","i18n"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}