{"record":{"id":"0add3d18f6a52250","repo":"DIYgod/RSSHub","slug":"this-channel-doesn-t-have-any-content","errorCode":null,"errorMessage":"This channel doesn't have any content.","messagePattern":"This channel doesn't have any content\\.","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"lib/routes/youtube/api/google.ts","lineNumber":112,"sourceCode":"            const origPlaylistId = userHandleData.playlistId;\n\n            return getPlaylistWithShortsFilter(origPlaylistId, filterShorts);\n        }\n        const channelData = await getChannelWithUsername(username, 'contentDetails', cache);\n        const items = channelData.data.items;\n\n        if (!items) {\n            throw new NotFoundError(`The channel https://www.youtube.com/user/${username} does not exist.`);\n        }\n\n        const channelId = items[0].id;\n\n        return filterShorts ? getPlaylistWithShortsFilter(channelId, filterShorts) : items[0].contentDetails.relatedPlaylists.uploads;\n    })();\n\n    const playlistItems = await getPlaylistItems(playlistId, 'snippet', cache);\n    if (!playlistItems) {\n        throw new NotFoundError(\"This channel doesn't have any content.\");\n    }\n    const videoIds = playlistItems.data.items.map((item) => item.snippet.resourceId.videoId);\n    const videoDetails = await getVideos(videoIds.join(','), 'contentDetails', cache);\n    const subtitlesMap = isJsonFeed ? await getSrtAttachmentBatch(videoIds) : {};\n\n    return {\n        title: `${userHandleData?.channelName || username} - YouTube`,\n        link: username.startsWith('@') ? `https://www.youtube.com/${username}` : `https://www.youtube.com/user/${username}`,\n        description: userHandleData?.description || `YouTube user ${username}`,\n        image: userHandleData?.image,\n        item: playlistItems.data.items\n            .filter((d) => d.snippet.title !== 'Private video' && d.snippet.title !== 'Deleted video')\n            .map((item) => {\n                const snippet = item.snippet;\n                const videoId = snippet.resourceId.videoId;\n                const img = getThumbnail(snippet.thumbnails);\n                const detail = videoDetails?.data.items.find((d) => d.id === videoId);\n                const srtAttachments = subtitlesMap ? subtitlesMap[videoId] || [] : [];","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/youtube/api/google.ts#L94-L130","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    return await getDataByUsername({ username, embed, filterShorts, isJsonFeed });\n} catch (e) {\n    if (e instanceof NotFoundError && /doesn't have any content/.test(e.message)) {\n        // Channel exists but has no uploads — return an empty feed rather than erroring, if desired\n        return { title: `${username} - YouTube`, item: [] };\n    }\n    throw e;\n}","preventionTips":["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."],"tags":["youtube","not-found","playlist","google-api"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}