{"record":{"id":"09be6a172b6bd573","repo":"DIYgod/RSSHub","slug":"manhuagui-rss-is-disabled-due-to-the-lack-of-a-hr","errorCode":null,"errorMessage":"manhuagui RSS is disabled due to the lack of <a href=\"https://docs.rsshub.app/deploy/config#route-specific-configurations\">relevant config</a>","messagePattern":"manhuagui RSS is disabled due to the lack of <a href=\"https://docs\\.rsshub\\.app/deploy/config#route-specific-configurations\">relevant config</a>","errorType":"validation","errorClass":"ConfigNotFoundError","httpStatus":null,"severity":"error","filePath":"lib/routes/manhuagui/subscribe.tsx","lineNumber":48,"sourceCode":"    },\n    radar: [\n        {\n            source: ['www.mhgui.com/user/book/shelf'],\n        },\n    ],\n    name: '漫画个人订阅',\n    maintainers: ['shininome'],\n    handler,\n    url: 'www.mhgui.com/user/book/shelf',\n    description: `::: tip\n个人订阅需要自建\n环境变量需要添加 MHGUI\\\\_COOKIE\n:::`,\n};\n\nasync function handler() {\n    if (!config.manhuagui || !config.manhuagui.cookie) {\n        throw new ConfigNotFoundError('manhuagui RSS is disabled due to the lack of <a href=\"https://docs.rsshub.app/deploy/config#route-specific-configurations\">relevant config</a>');\n    }\n    const cookie = config.manhuagui.cookie;\n    const response = await got({\n        method: 'get',\n        url: web_url,\n        headers: {\n            Cookie: cookie,\n        },\n    });\n    const $ = load(response.data);\n    const user_name = $('.avatar-box').find('h3').text();\n    const title = `${user_name} 的 漫画订阅`;\n    const link = web_url;\n    const description = `${user_name} 的 漫画订阅`;\n\n    const item = $('.dy_content_li')\n        .toArray()\n        .map((item) => {","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/manhuagui/subscribe.tsx#L30-L66","documentation":"Thrown as ConfigNotFoundError by the manhuagui subscribe route when either config.manhuagui is undefined or config.manhuagui.cookie is unset/empty. The route scrapes the authenticated bookshelf page which requires a valid MHGUI_COOKIE environment variable. Without it, the personal subscription feed cannot be built. This route is explicitly self-host-only.","triggerScenarios":"Running the route on a public/shared RSSHub instance that has not configured MHGUI_COOKIE. The env var is set but empty string. The env var name is misspelled (e.g. MANHUAGUI_COOKIE vs MHGUI_COOKIE). config.manhuagui exists but the cookie field is missing from the config schema.","commonSituations":"New self-hoster forgets to set MHGUI_COOKIE. The cookie has expired and returns a login page (but that fails later, not here — here it is purely a config-presence check). A docker deploy that doesn't pass the env var through.","solutions":["Set the MHGUI_COOKIE environment variable to your authenticated manhuagui session cookie (obtain from browser devtools after logging in).","For Docker, pass -e MHGUI_COOKIE='...' or add it to your env file.","Verify the config schema in lib/config.ts includes the manhuagui.cookie field if you are extending configuration.","This route is intentionally disabled on the public RSSHub instance — you must self-host."],"exampleFix":"// before\nif (!config.manhuagui || !config.manhuagui.cookie) {\n    throw new ConfigNotFoundError('manhuagui RSS is disabled ...');\n}\n\n// after — clearer message naming the exact env var (no change to logic)\nif (!config.manhuagui || !config.manhuagui.cookie) {\n    throw new ConfigNotFoundError('manhuagui personal-subscribe RSS requires the MHGUI_COOKIE environment variable. See https://docs.rsshub.app/deploy/config for setup. This route is self-host only.');\n}","handlingStrategy":"validation","validationCode":"import { config } from '@/config';\nif (!config.manhuagui?.cookie) {\n    throw new ConfigNotFoundError('This route requires MHGUI_COOKIE. Set it in your environment. Self-host only.');\n}\n// Optionally validate the cookie format before using it\nif (!/^[\\w\\s=;,.!-]+$/.test(config.manhuagui.cookie)) {\n    throw new ConfigNotFoundError('MHGUI_COOKIE appears malformed.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set MHGUI_COOKIE in your environment before subscribing to this route.","Document clearly that this route is self-host only and will never work on the public instance.","If the cookie expires, the later got() will fetch a login page — add a post-fetch check for a login form to detect expiry.","Keep the cookie secret — never log it or expose it in error messages."],"tags":["config","authentication","cookie","self-host","manhuagui"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}