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
- Set DISCORD_AUTHORIZATION in your environment or .env file.
- Verify the token is still valid by making a test Discord API call.
- Check the RSSHub config loading code to ensure the env var maps correctly to config.discord.authorization.
- 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
- Set DISCORD_AUTHORIZATION environment variable.
- Use a shared config check helper to avoid duplicating the guard across Discord routes.
- Test the token periodically since Discord tokens can expire.
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
- Discord RSS is disabled due to the lack of <a href="https://
- Discord RSS is disabled due to the lack of authorization con
- Discourse RSS is disabled due to the lack of <a href="https:
- 缺少对应论坛的cookie.
- 缺少对应 loginUid 的 Bilibili 用户登录后的 Cookie 值 <a href="https://do
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/e667f0ac28432641.
Report an issue: GitHub.