{"record":{"id":"94f7f63f2921b5c7","repo":"DIYgod/RSSHub","slug":"ff14risingstones-rss-is-disabled-due-to-the-lack-o","errorCode":null,"errorMessage":"ff14risingstones RSS is disabled due to the lack of relevant config","messagePattern":"ff14risingstones RSS is disabled due to the lack of relevant config","errorType":"validation","errorClass":"ConfigNotFoundError","httpStatus":null,"severity":"error","filePath":"lib/routes/sdo/ff14risingstones/utils.tsx","lineNumber":115,"sourceCode":"\nconst renderRolePlayParty = ({ cover_pic, open_time, rp_type, create_time, area, address, custom_label, profile, detail_mask }) =>\n    renderToString(\n        <>\n            {cover_pic ? <img src={cover_pic} /> : null}\n            <p>开放时间：{open_time}</p>\n            <p>RP 类型：{rp_type}</p>\n            <p>创立时间：{create_time}</p>\n            <p>区服：{area}</p>\n            <p>地址：{address}</p>\n            <p>标签：{custom_label}</p>\n            <p>简介：{profile}</p>\n            <div>{detail_mask ? raw(detail_mask) : null}</div>\n        </>\n    );\n\nexport function checkConfig() {\n    if (!config.sdo.ff14risingstones || !config.sdo.ua) {\n        throw new ConfigNotFoundError('ff14risingstones RSS is disabled due to the lack of relevant config');\n    }\n}\n\nexport function request(url: string, options?: RequestInit) {\n    return ofetch(url, {\n        ...options,\n        headers: {\n            Cookie: `ff14risingstones=${config.sdo.ff14risingstones}`,\n            'User-Agent': config.sdo.ua!,\n            ...options?.headers,\n        },\n    });\n}\n\nexport async function requestAPI<T = any>(url: string, options?: RequestInit) {\n    const response = (await request(url, options)) as BaseResponse<T>;\n\n    if (response.code !== 10000) {","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/sdo/ff14risingstones/utils.tsx#L97-L133","documentation":"A ConfigNotFoundError from checkConfig() when the ff14risingstones route is requested but the deployment lacks either the ff14risingstones session cookie (config.sdo.ff14risingstones) or the required User-Agent (config.sdo.ua). Both are needed to authenticate the cookie-gated SDO API, so the route is disabled entirely rather than failing mid-request.","triggerScenarios":"checkConfig() is called at the start of an ff14risingstones handler and `!config.sdo.ff14risingstones || !config.sdo.ua` is true — i.e. one or both env values (SDO_FF14RISINGSTONES, SDO_UA) are unset.","commonSituations":"Self-hosted RSSHub without SDO_* env vars configured; the session cookie expired and was cleared (but ua remains); config.sdo is undefined because the namespace was never registered.","solutions":["Set SDO_FF14RISINGSTONES (the ff14risingstones cookie value) and SDO_UA (a browser User-Agent) in the RSSHub environment and restart.","Refresh the ff14risingstones cookie by logging in at the SDO site and copying the current cookie value (these expire periodically).","Confirm both keys load under config.sdo.* via the config loader namespace."],"exampleFix":"// before\nexport function checkConfig() {\n    if (!config.sdo.ff14risingstones || !config.sdo.ua) {\n        throw new ConfigNotFoundError('ff14risingstones RSS is disabled due to the lack of relevant config');\n    }\n}\n\n// after — no code change; fix is environment-side:\n// .env\n// SDO_FF14RISINGSTONES=<cookie value>\n// SDO_UA=Mozilla/5.0 ...","handlingStrategy":"validation","validationCode":"// Surface a readiness check at startup so operators know the feature is off.\nfunction ff14ConfigReady(): boolean {\n    return Boolean(config.sdo?.ff14risingstones && config.sdo?.ua);\n}\nif (!ff14ConfigReady()) {\n    // return a clear 'feature disabled' notice instead of letting the route throw at request time\n}","typeGuard":"const hasFf14Config = (c: typeof config): c is typeof config & { sdo: { ff14risingstones: string; ua: string } } =>\n    Boolean(c.sdo?.ff14risingstones && c.sdo?.ua);","tryCatchPattern":"import ConfigNotFoundError from '@/errors/types/config-not-found';\ntry {\n    checkConfig();\n} catch (e) {\n    if (e instanceof ConfigNotFoundError) {\n        return ctx.json({ error: 'ff14risingstones route is disabled: set SDO_FF14RISINGSTONES and SDO_UA.' }, 503);\n    }\n    throw e;\n}","preventionTips":["Add SDO_FF14RISINGSTONES and SDO_UA to the deployment config template with comments on how to obtain the cookie.","Refresh the session cookie on a schedule (it expires) and alert on expiry.","Run a startup probe that logs which SDO-dependent routes are enabled."],"tags":["config","credentials","config-not-found","env","session"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}