DIYgod/RSSHub · error · ConfigNotFoundError

YouTube RSS is disabled due to the lack of <a href="https://

Error message

YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>

What it means

ConfigNotFoundError thrown by the YouTube live handler when config.youtube or config.youtube.key is missing. Like /c/, the live route depends on the YouTube Data API key to resolve channel/live data, so it aborts immediately if the key is absent.

Source

Thrown at lib/routes/youtube/live.ts:38

                name: 'YOUTUBE_KEY',
                description:
                    'YouTube API Key (enable YouTube Data API v3), support multiple keys, split them with `,`, [API Key application](https://console.developers.google.com/), [YouTube Data API v3](https://console.cloud.google.com/apis/library/youtube.googleapis.com)',
            },
        ],
        requirePuppeteer: false,
        antiCrawler: false,
        supportBT: false,
        supportPodcast: false,
        supportScihub: false,
    },
    name: 'Live',
    maintainers: ['sussurr127'],
    handler,
};

async function handler(ctx) {
    if (!config.youtube || !config.youtube.key) {
        throw new ConfigNotFoundError('YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
    }
    const username = ctx.req.param('username');
    const embed = !ctx.req.param('embed');

    let channelName;
    let channelId;

    const link = `https://www.youtube.com/${username}`;
    const response = await got(link);
    const $ = load(response.data);
    channelId = $('meta[itemprop="identifier"]').attr('content');
    channelName = $('meta[itemprop="name"]').attr('content');

    if (!channelId) {
        const channelInfo = (await getChannelWithUsername(username, 'snippet', cache)).data.items[0];
        channelId = channelInfo.id;
        channelName = channelInfo.snippet.title;
    }

View on GitHub (pinned to bed535e087)

Solutions

  1. Set YOUTUBE_KEY to a valid YouTube Data API v3 key and restart RSSHub.
  2. Confirm the key has the YouTube Data API v3 enabled and quota available.
  3. Use a keyless alternative route if you cannot configure one.
Defensive patterns

Strategy: validation

Validate before calling

import { config } from '@/config';
function requireYouTubeKey() {
    if (!config.youtube || !config.youtube.key) {
        throw new ConfigNotFoundError('Set the YOUTUBE_KEY env var to a YouTube Data API v3 key.');
    }
}

Prevention

When it happens

Trigger: Any request to /youtube/live/:username (or the live route) when YOUTUBE_KEY is unset. The guard fires before the got() to youtube.com.

Common situations: Same as 657: self-hosted instance without YOUTUBE_KEY; env var not passed to the container; key removed.

Related errors


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/43458be48a52be25. Report an issue: GitHub.