DIYgod/RSSHub · error · ConfigNotFoundError

Discord RSS is disabled due to the lack of authorization con

Error message

Discord RSS is disabled due to the lack of authorization config

What it means

The Discord quests route requires config.discord.authorization to be set. The handler destructures authorization from config.discord (defaulting to {}), and if it is falsy, throws ConfigNotFoundError. Without the authorization token, the route cannot call getQuests() which reads Discord's quest/activity API.

Source

Thrown at lib/routes/discord/quest.ts:38

        antiCrawler: false,
        supportBT: false,
        supportPodcast: false,
        supportScihub: false,
    },
    radar: [
        {
            source: ['discord.com/quest-home'],
        },
    ],
    name: 'Quests',
    maintainers: ['TonyRL'],
    handler,
};

async function handler() {
    const { authorization } = config.discord || {};
    if (!authorization) {
        throw new ConfigNotFoundError('Discord RSS is disabled due to the lack of authorization config');
    }

    const questData = await getQuests(authorization);

    const items = questData.quests.map((quest) => {
        const tasks = Object.values(quest.config.task_config.tasks).map((task) => task.event_name);
        return {
            title: `${quest.config.messages.quest_name} - Claim ${quest.config.rewards_config.rewards[0].messages.name}`,
            description: tasks.join(', '),
            author: quest.config.messages.game_publisher,
            pubDate: parseDate(quest.config.starts_at),
            category: tasks,
            link: quest.config.application.link.split('?', 1)[0],
            guid: quest.id,
        };
    });

    return {

View on GitHub (pinned to bed535e087)

Solutions

  1. Set DISCORD_AUTHORIZATION in your environment or .env file.
  2. Verify the token is still valid by making a test Discord API call.
  3. Check the RSSHub config loading code to ensure the env var maps correctly to config.discord.authorization.
  4. Restart the RSSHub process after configuration changes.
Defensive patterns

Strategy: validation

Validate before calling

if (!config.discord?.authorization) {
    throw new ConfigNotFoundError('Set DISCORD_AUTHORIZATION to use Discord quest routes');
}

Type guard

function hasDiscordAuth(cfg: any): cfg is { discord: { authorization: string } } {
    return typeof cfg?.discord?.authorization === 'string' && cfg.discord.authorization.length > 0;
}

Prevention

When it happens

Trigger: config.discord is either undefined or an object without an authorization property. The handler immediately exits before making any API calls. This is the same root cause as error 173 but in the quests route — the config check is duplicated across Discord routes.

Common situations: DISCORD_AUTHORIZATION environment variable not set; token was valid but has since expired; the deployment's config module does not properly parse the env var into config.discord.authorization; new deployment that hasn't been configured yet.

Related errors


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