{"record":{"id":"3bdad784bb60aaec","repo":"DIYgod/RSSHub","slug":"fanfou-rss-is-disabled-due-to-the-lack-of-a-href","errorCode":null,"errorMessage":"Fanfou RSS is disabled due to the lack of <a href=\"https://docs.rsshub.app/deploy/config#route-specific-configurations\">relevant config</a>","messagePattern":"Fanfou RSS is disabled due to the lack of <a href=\"https://docs\\.rsshub\\.app/deploy/config#route-specific-configurations\">relevant config</a>","errorType":"exception","errorClass":null,"httpStatus":503,"severity":"warning","filePath":"lib/routes-deprecated/fanfou/favorites.js","lineNumber":6,"sourceCode":"const config = require('@/config').value;\nconst utils = require('./utils');\n\nmodule.exports = async (ctx) => {\n    if (!config.fanfou || !config.fanfou.consumer_key || !config.fanfou.consumer_secret || !config.fanfou.username || !config.fanfou.password) {\n        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>');\n    }\n\n    const uid = ctx.params.uid;\n    const fanfou = await utils.getFanfou();\n    const timeline = await fanfou.get(`/favorites/${encodeURIComponent(uid)}`, { id: uid, mode: 'lite', format: 'html' });\n\n    const result = timeline.map((item) => {\n        let img_html = '';\n        if (item.photo) {\n            img_html = `<br/><img src=\"${item.photo.largeurl}\" alt=\"饭否动态图片\"/>`;\n        }\n        return {\n            title: item.text,\n            author: item.user.name,\n            description: item.text + img_html,\n            pubDate: item.created_at,\n            link: `https://fanfou.com/statuses/${item.id}`,\n        };","sourceCodeStart":1,"sourceCodeEnd":24,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes-deprecated/fanfou/favorites.js#L1-L24","documentation":"Thrown by the fanfou favorites route when any of config.fanfou.consumer_key, consumer_secret, username, or password is missing. Fanfou's OAuth1-style API requires all four, so RSSHub disables the route rather than fail at request time.","triggerScenarios":"Any FANFOU_CONSUMER_KEY / FANFOU_CONSUMER_SECRET / FANFOU_USERNAME / FANFOU_PASSWORD env var is unset on the instance.","commonSituations":"Optional fanfou config never added; partial config (only some vars set); env renamed in a deploy.","solutions":["Set all four FANFOU_* env vars (consumer_key, consumer_secret, username, password) and restart.","If you do not use fanfou, remove the route from any client subscriptions."],"exampleFix":"# before\n# (partial or no fanfou config)\n# after\nFANFOU_CONSUMER_KEY=...\nFANFOU_CONSUMER_SECRET=...\nFANFOU_USERNAME=...\nFANFOU_PASSWORD=...","handlingStrategy":"validation","validationCode":"const f = config.fanfou;\nconst ok = f && f.consumer_key && f.consumer_secret && f.username && f.password;\nif (!ok) throw new Error('Fanfou RSS is disabled ...');","typeGuard":"const isFanfouConfigured = (c: any): boolean =>\n  !!c?.fanfou?.consumer_key && !!c?.fanfou?.consumer_secret &&\n  !!c?.fanfou?.username && !!c?.fanfou?.password;","tryCatchPattern":null,"preventionTips":["Set all four FANFOU_* vars together.","Do not expose /fanfou routes until creds are verified."],"tags":["config","auth","routes","optional-feature","oauth"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}