DIYgod/RSSHub · error · NotFoundError
This channel doesn't have any content.
Error message
This channel doesn't have any content.
What it means
NotFoundError thrown inside getDataByUsername after the uploads playlist id is resolved. getPlaylistItems(playlistId, 'snippet') returned a falsy value, meaning the channel exists but its uploads playlist returned no items (or the API call yielded an empty/missing response). Distinguished from 654: here the channel was found, but it has no retrievable content.
Source
Thrown at lib/routes/youtube/api/google.ts:112
const origPlaylistId = userHandleData.playlistId;
return getPlaylistWithShortsFilter(origPlaylistId, filterShorts);
}
const channelData = await getChannelWithUsername(username, 'contentDetails', cache);
const items = channelData.data.items;
if (!items) {
throw new NotFoundError(`The channel https://www.youtube.com/user/${username} does not exist.`);
}
const channelId = items[0].id;
return filterShorts ? getPlaylistWithShortsFilter(channelId, filterShorts) : items[0].contentDetails.relatedPlaylists.uploads;
})();
const playlistItems = await getPlaylistItems(playlistId, 'snippet', cache);
if (!playlistItems) {
throw new NotFoundError("This channel doesn't have any content.");
}
const videoIds = playlistItems.data.items.map((item) => item.snippet.resourceId.videoId);
const videoDetails = await getVideos(videoIds.join(','), 'contentDetails', cache);
const subtitlesMap = isJsonFeed ? await getSrtAttachmentBatch(videoIds) : {};
return {
title: `${userHandleData?.channelName || username} - YouTube`,
link: username.startsWith('@') ? `https://www.youtube.com/${username}` : `https://www.youtube.com/user/${username}`,
description: userHandleData?.description || `YouTube user ${username}`,
image: userHandleData?.image,
item: playlistItems.data.items
.filter((d) => d.snippet.title !== 'Private video' && d.snippet.title !== 'Deleted video')
.map((item) => {
const snippet = item.snippet;
const videoId = snippet.resourceId.videoId;
const img = getThumbnail(snippet.thumbnails);
const detail = videoDetails?.data.items.find((d) => d.id === videoId);
const srtAttachments = subtitlesMap ? subtitlesMap[videoId] || [] : [];View on GitHub (pinned to bed535e087)
Solutions
- Open https://www.youtube.com/playlist?list=<uploadsPlaylistId> to confirm whether videos actually exist.
- Retry — transient empty responses from the YouTube API occasionally occur.
- If the channel genuinely has no videos, this error is correct behavior; subscribe later.
- Verify YOUTUBE_KEY quota in the Google Cloud console if the issue is widespread across channels.
Defensive patterns
Strategy: try-catch
Try / catch
try {
return await getDataByUsername({ username, embed, filterShorts, isJsonFeed });
} catch (e) {
if (e instanceof NotFoundError && /doesn't have any content/.test(e.message)) {
// Channel exists but has no uploads — return an empty feed rather than erroring, if desired
return { title: `${username} - YouTube`, item: [] };
}
throw e;
} Prevention
- Confirm the uploads playlist has items at youtube.com/playlist?list=<id>.
- Retry once on empty responses — YouTube API occasionally returns transient empties.
- Watch API quota in Google Cloud Console if many channels report no content.
When it happens
Trigger: A valid channel whose uploads playlist is empty (new channel with no videos), or getPlaylistItems returned undefined because the YouTube API responded with an error/empty body (quota, private playlist, or the channel hides its uploads). The check `if (!playlistItems)` fires after the playlistItems await.
Common situations: Channel has zero public videos; all videos are private/deleted; the uploads playlist was set private by the owner; transient YouTube API failure returning an empty response; API key quota exhausted mid-request.
Related errors
- The channel https://www.youtube.com/user/${username} does no
- YouTube RSS is disabled due to the lack of <a href="https://
- YouTube RSS is disabled due to the lack of <a href="https://
- YouTube RSS is disabled due to the lack of <a href="https://
- 没有获取到数据
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/0add3d18f6a52250.
Report an issue: GitHub.