{"record":{"id":"bbca84208debc946","repo":"DIYgod/RSSHub","slug":"fanfou-rss-is-disabled-due-to-the-lack-of-a-href-bbca84","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/public-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 keyword = ctx.params.keyword;\n    const fanfou = await utils.getFanfou();\n    const timeline = await fanfou.get('/search/public_timeline', { q: keyword, 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\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: `https://fanfou.com/statuses/${item.id}`,","sourceCodeStart":1,"sourceCodeEnd":24,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes-deprecated/fanfou/public-timeline.js#L1-L24","documentation":"Thrown by the fanfou public-timeline route when any of config.fanfou.consumer_key, consumer_secret, username, or password is missing. The public search endpoint still requires authenticated OAuth credentials in fanfou's model.","triggerScenarios":"Any of the four FANFOU_* env vars is unset when /fanfou/public-timeline/:keyword is requested.","commonSituations":"Optional fanfou config omitted, partial, or renamed.","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.","Keep fanfou routes behind the same config guard used by the other fanfou routes."],"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"}