DIYgod/RSSHub · warning
Fanfou RSS is disabled due to the lack of <a href="https://d
Error message
Fanfou 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
Thrown by the fanfou user-timeline route when any of config.fanfou.consumer_key, consumer_secret, username, or password is missing. Same guard family as the other fanfou routes.
Source
Thrown at lib/routes-deprecated/fanfou/user-timeline.js:6
const config = require('@/config').value;
const utils = require('./utils');
module.exports = async (ctx) => {
if (!config.fanfou || !config.fanfou.consumer_key || !config.fanfou.consumer_secret || !config.fanfou.username || !config.fanfou.password) {
throw new Error('Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
}
const uid = ctx.params.uid;
const fanfou = await utils.getFanfou();
const timeline = await fanfou.get('/statuses/user_timeline', { id: uid, mode: 'lite', format: 'html' });
const result = timeline.map((item) => {
let img_html = '';
if (item.photo) {
img_html = `<br/><img src="${item.photo.originurl}" alt="饭否动态图片"/>`;
}
return {
title: item.plain_text,
author: item.user.name,
description: item.text + img_html,
pubDate: item.created_at,
link: `https://fanfou.com/statuses/${item.id}`,
};View on GitHub (pinned to bed535e087)
Solutions
- Set all four FANFOU_* env vars and restart.
- Remove the route from clients if fanfou is not used.
Example fix
# before # (partial or no fanfou config) # after FANFOU_CONSUMER_KEY=... FANFOU_CONSUMER_SECRET=... FANFOU_USERNAME=... FANFOU_PASSWORD=...
Defensive patterns
Strategy: validation
Validate before calling
const f = config.fanfou;
const ok = f && f.consumer_key && f.consumer_secret && f.username && f.password;
if (!ok) throw new Error('Fanfou RSS is disabled ...'); Type guard
const isFanfouConfigured = (c: any): boolean => !!c?.fanfou?.consumer_key && !!c?.fanfou?.consumer_secret && !!c?.fanfou?.username && !!c?.fanfou?.password;
Prevention
- Set all four FANFOU_* vars together.
- Centralize the fanfou config guard in utils to avoid drift across routes.
When it happens
Trigger: Any of the four FANFOU_* env vars is unset when /fanfou/user-timeline/:uid is requested.
Common situations: Optional fanfou config omitted, partial, or renamed during deploy.
Related errors
- Fanfou RSS is disabled due to the lack of <a href="https://d
- Fanfou RSS is disabled due to the lack of <a href="https://d
- Fanfou RSS is disabled due to the lack of <a href="https://d
- Disqus RSS is disabled due to the lack of <a href="https://d
- Login required
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/c7300f8520076dda.
Report an issue: GitHub.