DIYgod/RSSHub · warning · InvalidParameterError
Username does not exist
Error message
Username does not exist
What it means
InvalidParameterError from the Twitch schedule route: if the GQL `streamScheduleData.user.id` is falsy, the login does not correspond to a real Twitch user, so the route rejects it as a bad parameter rather than a server error.
Source
Thrown at lib/routes/twitch/schedule.ts:80
utcOffsetMinutes: 480,
startAt: today.toISOString(),
endAt: oneWeekLater.toISOString(),
},
extensions: {
persistedQuery: {
version: 1,
sha256Hash: '01925339777a81111ffac469430bc4ea4773c18a3c1642f1b231e61e2278ea41',
},
},
},
],
});
const channelShellData = response.data[0].data;
const streamScheduleData = response.data[1].data;
if (!streamScheduleData.user.id) {
throw new InvalidParameterError('Username does not exist');
}
const displayName = channelShellData.userOrError.displayName;
// schedule segments may be null
const out = streamScheduleData.user.channel.schedule.segments?.map((item) => ({
title: item.title,
guid: item.id,
link: `https://www.twitch.tv/${login}`,
author: displayName,
description: `StartAt: ${item.startAt}</br>EndAt: ${item.endAt}`,
category: item.categories.map((item) => item.name),
}));
return {
title: `Twitch - ${displayName} - Schedule`,
link: `https://www.twitch.tv/${login}`,
item: out,View on GitHub (pinned to bed535e087)
Solutions
- Confirm the login exists at https://www.twitch.tv/{login}/schedule.
- Use the correct (possibly renamed) login.
- If logins are correct, verify the persistedQuery sha256Hash still matches Twitch's current operations.
Defensive patterns
Strategy: validation
Validate before calling
if (!streamScheduleData?.user?.id) { throw new InvalidParameterError(`Twitch username does not exist: ${login}`); } Type guard
const isScheduleUser = (u: unknown): u is { id: string } => typeof u === 'object' && u !== null && typeof (u as any).id === 'string'; Prevention
- Validate login format up front
- Track Twitch persisted-query hash changes
- Treat missing user.id as a 404, not a 500
When it happens
Trigger: Requesting `/twitch/schedule/:login` where Twitch's schedule GQL response has no `user.id` — line 79-81 throws. The user either does not exist or has no schedule.
Common situations: Login typo, deleted/renamed channel, or the GQL persistedQuery hash drifted and Twitch returns an empty user object.
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/1e2e657f3838cb7e.
Report an issue: GitHub.