DIYgod/RSSHub · error · InvalidParameterError
Bad parameter. See <a href="https://docs.rsshub.app/routes/g
Error message
Bad parameter. See <a href="https://docs.rsshub.app/routes/game#wang-yi-da-shen">https://docs.rsshub.app/routes/game#wang-yi-da-shen</a>
What it means
The 163 'special column' (专栏) route requires a numeric `type` (1–15) that selects which editorial column to fetch (1=轻松一刻, 2=槽值, 3=人间 …). The handler refuses to proceed when the segment is absent because there is no sensible default column.
Source
Thrown at lib/routes/163/news/special.ts:49
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false,
},
name: '专栏',
maintainers: ['nczitzk'],
handler,
description: `| 轻松一刻 | 槽值 | 人间 | 大国小民 | 三三有梗 | 数读 | 看客 | 下划线 | 谈心社 | 哒哒 | 胖编怪聊 | 曲一刀 | 今日之声 | 浪潮 | 沸点 |
| -------- | ---- | ---- | -------- | -------- | ---- | ---- | ------ | ------ | ---- | -------- | ------ | -------- | ---- | ---- |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |`,
};
async function handler(ctx) {
if (!ctx.req.param('type')) {
throw new InvalidParameterError('Bad parameter. See <a href="https://docs.rsshub.app/routes/game#wang-yi-da-shen">https://docs.rsshub.app/routes/game#wang-yi-da-shen</a>');
}
const selectedType = Number.parseInt(ctx.req.param('type'));
let type;
switch (selectedType) {
case 1:
type = 'BD21K0DLwangning'; // 轻松一刻
break;
case 2:
type = 'CICMICLUwangning'; // 槽值
break;
case 3:
type = 'CICMOMBLwangning'; // 人间
break;
case 4:
type = 'CICMPVC5wangning'; // 大国小民
break;
case 5:
type = 'CICMLCOUwangning'; // 三三有梗View on GitHub (pinned to bed535e087)
Solutions
- Append a numeric type 1–15 to the route path (see the description table: 1=轻松一刻, 2=槽值, 3=人间, …, 15=沸点).
- If you want a specific feed, request that column's number explicitly rather than the bare path.
- If a radar rule generated the URL, fix its source/target to capture the segment.
Example fix
// before /163/news/special // after /163/news/special/1
Defensive patterns
Strategy: validation
Validate before calling
const VALID_SPECIAL_TYPES = new Set(Array.from({ length: 15 }, (_, i) => String(i + 1)));
function valid163Special(type) {
return type != null && VALID_SPECIAL_TYPES.has(String(type));
} Type guard
function is163SpecialType(v): v is string {
return typeof v === 'string' && /^[1-9]$|^1[0-5]$/.test(v);
} Prevention
- Treat `type` as required for the special-column route — never call the bare path.
- Centralise the 1–15 mapping in one place so callers cannot drift from the route table.
- If a radar rule feeds this route, assert it captured the segment before building the URL.
When it happens
Trigger: Calling /163/news/special without the :type segment, or with an empty value, so ctx.req.param('type') is falsy.
Common situations: Following a docs example that omitted the type; a radar rule that failed to capture the segment; constructing the URL programmatically and forgetting the final path component.
Related errors
- Bad timeRange range. See <a href="https://docs.rsshub.app/ro
- Invalid city
- Invalid channel name
- This category does not exist. Please refer to the documentat
- Invalid category Id: ${categoryId}
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/44eb07df96876eee.
Report an issue: GitHub.