DIYgod/RSSHub · warning · InvalidParameterError
Username does not exist
Error message
Username does not exist
What it means
InvalidParameterError from the Twitch video route: the GQL `channelVideoShelvesQueryData.user.id` is falsy, meaning Twitch returned no user for the login. Treated as a bad parameter (login does not exist).
Source
Thrown at lib/routes/twitch/video.ts:86
operationName: 'ChannelVideoShelvesQuery',
variables: {
channelLogin: login,
first: 5,
},
extensions: {
persistedQuery: {
version: 1,
sha256Hash: '7b31d8ae7274b79d169a504e3727baaaed0d5ede101f4a38fc44f34d76827903',
},
},
},
],
});
const channelVideoShelvesQueryData = response.data[0].data;
if (!channelVideoShelvesQueryData.user.id) {
throw new InvalidParameterError('Username does not exist');
}
const displayName = channelVideoShelvesQueryData.user.displayName;
const videoShelvesEdge = channelVideoShelvesQueryData.user.videoShelves.edges.find((edge) => edge.node.type === FILTER_NODE_TYPE_MAP[filter]);
if (!videoShelvesEdge) {
throw new InvalidParameterError(`No video under filter type "${filter}"`);
}
const out = videoShelvesEdge.node.items.map((item) => ({
title: item.title,
link: `https://www.twitch.tv/videos/${item.id}`,
author: displayName,
pubDate: parseDate(item.publishedAt),
description: `<img style="max-width: 100%;" src="${item.previewThumbnailURL}"><br/><img style="max-width: 100%;" src="${item.animatedPreviewURL}">`,
category: item.game && [item.game.displayName], // item.game may be null
}));
View on GitHub (pinned to bed535e087)
Solutions
- Confirm the login exists at https://www.twitch.tv/{login}/videos.
- Use the current login if the channel was renamed.
- Verify the persistedQuery sha256Hash for ChannelVideoShelvesQuery is still valid.
Defensive patterns
Strategy: validation
Validate before calling
if (!channelVideoShelvesQueryData?.user?.id) { throw new InvalidParameterError(`Twitch username does not exist: ${login}`); } Type guard
const isTwitchUser = (u: unknown): u is { id: string; displayName: string } => typeof u === 'object' && u !== null && typeof (u as any).id === 'string'; Prevention
- Validate the login format before the GQL call
- Track the ChannelVideoShelvesQuery hash
- Surface a 404 — not 500 — for unknown logins
When it happens
Trigger: Requesting `/twitch/video/:login` with a login Twitch does not recognize — line 85-87 throws after the GQL response comes back with no user.id.
Common situations: Login typo, deactivated/renamed channel, or a stale persistedQuery hash returning an empty user.
Related errors
- ${userOrError.__typename}
- Username does not exist
- No video under filter type "${filter}"
- Invalid type: ${type}
- Unsupported filter type "${filter}", please choose from { ${
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/c6d4178361f1f811.
Report an issue: GitHub.