DIYgod/RSSHub · error · ConfigNotFoundError
Discourse RSS is disabled due to the lack of <a href="https:
Error message
Discourse RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/">relevant config</a>
What it means
The Discourse route utilities function getConfig looks up a named Discourse instance configuration by configId from config.discourse.config. Discourse is self-hosted forum software, so each instance needs its own URL and optionally API key. If the configId provided in the route path has no corresponding entry in the configuration, a ConfigNotFoundError is thrown.
Source
Thrown at lib/routes/discourse/utils.ts:7
import { config } from '@/config';
import ConfigNotFoundError from '@/errors/types/config-not-found';
function getConfig(ctx) {
const discourseConfig = config.discourse.config[ctx.req.param('configId')];
if (!discourseConfig) {
throw new ConfigNotFoundError('Discourse RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/">relevant config</a>');
}
return discourseConfig;
}
export { getConfig };
View on GitHub (pinned to bed535e087)
Solutions
- Configure the Discourse instance in RSSHub's config by setting the appropriate environment variables (see https://docs.rsshub.app/deploy/).
- Ensure the configId in the route URL matches the key in config.discourse.config exactly.
- List configured Discourse instances by checking your environment variables or config file.
- If self-hosting, add a new DISCOURSE_CONFIG entry for the forum you want to follow.
Defensive patterns
Strategy: validation
Validate before calling
const discourseConfig = config.discourse?.config?.[ctx.req.param('configId')];
if (!discourseConfig) {
const configured = Object.keys(config.discourse?.config || {});
throw new ConfigNotFoundError(`Discourse config '${ctx.req.param('configId')}' not found. Configured instances: ${configured.join(', ') || 'none'}`);
} Type guard
function hasDiscourseConfig(cfg: any, configId: string): boolean {
return cfg?.discourse?.config?.[configId] != null;
} Prevention
- Configure Discourse instances via environment variables before using Discourse routes.
- Use a consistent configId naming convention.
- List configured instances in the error message to help users self-diagnose.
When it happens
Trigger: ctx.req.param('configId') returns a key that does not exist in config.discourse.config. The config.discourse.config object is populated from environment variables (DISCOURSE_CONFIG_* or a JSON config), and if the requested configId has no matching entry, the lookup fails.
Common situations: The user provides a configId that was never configured (e.g., /discourse/myforum/... when only 'example' is configured); the environment variable naming doesn't match the expected pattern; the configId has a typo; the deployment hasn't set up any Discourse configurations.
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
- Discord RSS is disabled due to the lack of authorization con
- 缺少对应论坛的cookie.
- No valid Twitter token found
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/4aff990d2bd3d18d.
Report an issue: GitHub.