{"record":{"id":"67e61075e95e8dc6","repo":"DIYgod/RSSHub","slug":"miyoushe-timeline-is-not-available-due-to-the-abse","errorCode":null,"errorMessage":"Miyoushe Timeline is not available due to the absense of [Miyoushe Cookie]. Check <a href=\"https://docs.rsshub.app/deploy/config#route-specific-configurations\">relevant config tutorial</a>","messagePattern":"Miyoushe Timeline is not available due to the absense of \\[Miyoushe Cookie\\]\\. Check <a href=\"https://docs\\.rsshub\\.app/deploy/config#route-specific-configurations\">relevant config tutorial</a>","errorType":"exception","errorClass":"ConfigNotFoundError","httpStatus":null,"severity":"error","filePath":"lib/routes/mihoyo/bbs/timeline.ts","lineNumber":42,"sourceCode":"        supportPodcast: false,\n        supportScihub: false,\n    },\n    radar: [\n        {\n            source: ['miyoushe.com/:game/timeline'],\n        },\n    ],\n    name: '米游社 - 用户关注动态',\n    maintainers: ['CaoMeiYouRen'],\n    handler,\n    description: `::: warning\n用户关注动态需要米游社登录后的 Cookie 值，所以只能自建，详情见部署页面的配置模块。\n:::`,\n};\n\nasync function handler(ctx) {\n    if (!config.mihoyo.cookie) {\n        throw new ConfigNotFoundError('Miyoushe Timeline is not available due to the absense of [Miyoushe Cookie]. Check <a href=\"https://docs.rsshub.app/deploy/config#route-specific-configurations\">relevant config tutorial</a>');\n    }\n\n    const page_size = ctx.req.query('limit') || '20';\n    const searchParams = {\n        gids: 2,\n        page_size,\n    };\n    const link = 'https://www.miyoushe.com/ys/timeline';\n    const url = 'https://bbs-api.miyoushe.com/painter/wapi/timeline/list';\n    const response = await got({\n        method: 'get',\n        url,\n        searchParams,\n        headers: {\n            Referer: link,\n            Cookie: config.mihoyo.cookie,\n        },\n    });","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/mihoyo/bbs/timeline.ts#L24-L60","documentation":"ConfigNotFoundError thrown when the Miyoushe timeline route requires config.mihoyo.cookie but it is not set. The personalized follow-feed timeline (米游社 用户关注动态) needs a logged-in cookie, so only self-hosted instances with MIHOYO_COOKIE configured can serve it.","triggerScenarios":"!config.mihoyo.cookie at the top of the handler — the global mihoyo cookie env var is absent, so the route refuses to call the timeline API.","commonSituations":"Self-hosted RSSHub without MIHOYO_COOKIE; public instance (never sets it); env var typo; cookie removed during an upgrade.","solutions":["Set MIHOYO_COOKIE env var to the Cookie header from a logged-in miyoushe.com session.","Restart RSSHub after setting the env var.","Verify the env var name (MIHOYO_COOKIE) against current docs.","Confirm the cookie is fresh — login to miyoushe.com and recopy."],"exampleFix":"// before\n// .env: no MIHOYO_COOKIE\n\n// after\nMIHOYO_COOKIE=account_id=12345; cookie_token=...; ltoken=...","handlingStrategy":"validation","validationCode":"if (!config.mihoyo.cookie) {\n    throw new ConfigNotFoundError('Set MIHOYO_COOKIE to use the Miyoushe timeline route');\n}","typeGuard":"function hasMihoyoCookie(): boolean {\n    return typeof config.mihoyo.cookie === 'string' && config.mihoyo.cookie.length > 0;\n}","tryCatchPattern":null,"preventionTips":["Document MIHOYO_COOKIE as required for timeline routes.","Validate env vars at RSSHub startup with a clear missing-config error.","Keep a runbook for refreshing the Miyoushe cookie."],"tags":["mihoyo","config","auth","cookie"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}