{"record":{"id":"3f89b95d53a07c3a","repo":"DIYgod/RSSHub","slug":"fanfou-rss-is-disabled-due-to-the-lack-of-a-href-3f89b9","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/home-timeline.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 fanfou = await utils.getFanfou();\n    const timeline = await fanfou.get('/statuses/home_timeline', { 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.originurl}\" alt=\"饭否动态图片\"/>`;\n        }\n        return {\n            title: item.plain_text,\n            author: item.user.name,\n            description: item.text + img_html,\n            pubDate: item.created_at,\n            link: `http://fanfou.com/statuses/${item.id}`,\n        };\n    });","sourceCodeStart":1,"sourceCodeEnd":24,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes-deprecated/fanfou/home-timeline.js#L1-L24","documentation":"Thrown by the fanfou home-timeline route when any of config.fanfou.consumer_key, consumer_secret, username, or password is missing. Identical guard to the other fanfou routes; the home timeline is an authenticated-only endpoint.","triggerScenarios":"Any of the four FANFOU_* env vars is unset when /fanfou/home-timeline is requested.","commonSituations":"Same as other fanfou routes: optional config omitted, partial, or renamed during deploy.","solutions":["Set all four FANFOU_* env vars and restart.","Remove the route from clients if fanfou is not used."],"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.","Verify the OAuth handshake with a single test request after restart."],"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"}