DIYgod/RSSHub · error · InvalidParameterError
Invalid user
Error message
Invalid user
What it means
Thrown by the itch.io devlog route as `InvalidParameterError('Invalid user')` when the `user` path param fails `isValidHost(user)` — i.e. the subdomain-style user id is not a valid hostname. The route builds `https://${user}.itch.io/${id}/devlog`, so `user` must be a syntactically valid host label.
Source
Thrown at lib/routes/itch/devlog.ts:41
supportPodcast: false,
supportScihub: false,
},
name: 'Developer Logs',
maintainers: ['nczitzk'],
handler,
description: `\`User id\` is the field before \`.itch.io\` in the URL of the corresponding page, e.g. the URL of [The Baby In Yellow Devlog](https://teamterrible.itch.io/the-baby-in-yellow/devlog) is \`https://teamterrible.itch.io/the-baby-in-yellow/devlog\`, where the field before \`.itch.io\` is \`teamterrible\`.
\`Item id\` is the field between \`itch.io\` and \`/devlog\` in the URL of the corresponding page, e.g. the URL for [The Baby In Yellow Devlog](https://teamterrible.itch.io/the-baby-in-yellow/devlog) is \`https://teamterrible.itch.io/the-baby-in-yellow/devlog\`, where the field between \`itch.io\` and \`/devlog\` is \`the-baby-in-yellow\`.
So the route is [\`/itch/devlogs/teamterrible/the-baby-in-yellow\`](https://rsshub.app/itch/devlogs/teamterrible/the-baby-in-yellow).`,
};
async function handler(ctx) {
const user = ctx.req.param('user') ?? '';
const id = ctx.req.param('id') ?? '';
const limit = Number.parseInt(ctx.req.query('limit')) || 20;
if (!isValidHost(user)) {
throw new InvalidParameterError('Invalid user');
}
const rootUrl = `https://${user}.itch.io/${id}/devlog`;
const response = await got({
method: 'get',
url: rootUrl,
});
const $ = load(response.data);
let items = $('.title')
.toArray()
.slice(0, limit)
.map((item): DataItem => {
const $item = $(item);
return {View on GitHub (pinned to bed535e087)
Solutions
- Pass only the subdomain portion (the part before `.itch.io`), lowercase, hyphen-separated: `/itch/devlogs/teamterrible/the-baby-in-yellow`.
- Do not include `https://` or `.itch.io` in the `user` param.
- Double-check argument order: user comes first, item id second.
Example fix
// before: /itch/devlogs/https://teamterrible.itch.io/the-baby-in-yellow/devlog // after: /itch/devlogs/teamterrible/the-baby-in-yellow
Defensive patterns
Strategy: validation
Validate before calling
if (!isValidHost(user)) throw new InvalidParameterError(`Invalid itch.io user subdomain: '${user}'`); Type guard
const isValidItchUser = (u: string) => Boolean(u) && /^[a-z0-9][a-z0-9-]*$/.test(u) && isValidHost(u);
Prevention
- Pass only the subdomain portion (lowercase, hyphen-separated) — never the full URL.
- Keep arg order: user first, item id second.
- Document the expected format with a worked example (the route already does).
When it happens
Trigger: Request to `/itch/devlogs/:user/:id` where `user` contains invalid hostname characters (underscores, spaces, dots, etc.) or is empty. `isValidHost` rejects it before any HTTP call.
Common situations: Typo in the user slug; user pasted the full URL instead of just the subdomain part; the user field contains uppercase or special characters; the route was called with the game id in the user slot.
Related errors
- Invalid site
- Invalid category
- At least one valid search parameter is required
- 无法检测 Discuz 版本,请在路由中指定版本参数,如 /discuz/x/ 或 /discuz/7/
- 不支持当前Discuz版本.
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/239788e66f3ee8a4.
Report an issue: GitHub.