{"record":{"id":"28db36c72240e651","repo":"DIYgod/RSSHub","slug":"github-trending-rss-is-disabled-due-to-the-lack-of","errorCode":null,"errorMessage":"GitHub trending RSS is disabled due to the lack of <a href=\"https://docs.rsshub.app/deploy/config#route-specific-configurations\">relevant config</a>","messagePattern":"GitHub trending 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/github/trending.tsx","lineNumber":69,"sourceCode":"        supportBT: false,\n        supportPodcast: false,\n        supportScihub: false,\n    },\n    radar: [\n        {\n            source: ['github.com/trending'],\n            target: '/trending/:since',\n        },\n    ],\n    name: 'Trending',\n    maintainers: ['DIYgod', 'jameschensmith'],\n    handler,\n    url: 'github.com/trending',\n};\n\nasync function handler(ctx) {\n    if (!config.github || !config.github.access_token) {\n        throw new ConfigNotFoundError('GitHub trending 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 since = ctx.req.param('since');\n    const language = ctx.req.param('language') === 'any' ? '' : ctx.req.param('language');\n    const spoken_language = ctx.req.param('spoken_language') ?? '';\n\n    const trendingUrl = `https://github.com/trending/${encodeURIComponent(language)}?since=${since}&spoken_language_code=${spoken_language}`;\n    const { data: trendingPage } = await got({\n        method: 'get',\n        url: trendingUrl,\n        headers: {\n            Referer: trendingUrl,\n        },\n    });\n    const $ = load(trendingPage);\n\n    const articles = $('article');\n    const trendingRepos = articles.toArray().map((item) => {\n        const [owner, name] = $(item).find('h2').text().split('/', 2);","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/github/trending.tsx#L51-L87","documentation":"The GitHub trending route scrapes github.com/trending and requires an authenticated request, so it demands `config.github.access_token`. If `config.github` is absent or has no access_token the handler throws ConfigNotFoundError with an HTML link to the deploy config docs. This is a deployment-configuration failure, not user input.","triggerScenarios":"Self-hosting RSSHub without setting GITHUB_ACCESS_TOKEN; a public instance where the operator did not configure the GitHub block.","commonSituations":"Fresh deploy missing the GitHub credentials env var; the token was revoked or expired (though the check is for presence, not validity).","solutions":["Set config.github.access_token (env: GITHUB_ACCESS_TOKEN) with a valid personal access token and restart RSSHub.","If you cannot supply a token, use a different GitHub route that does not require auth.","Refer to the linked deploy config docs for the exact env var name."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { config } from '@/config';\nfunction githubTrendingConfigured(): boolean {\n  return Boolean(config.github?.access_token);\n}","typeGuard":"function githubTrendingConfigured(): boolean {\n  return Boolean(config.github?.access_token);\n}","tryCatchPattern":null,"preventionTips":["Set GITHUB_ACCESS_TOKEN at deploy time; gate the route on its presence.","Monitor token expiry separately from presence."],"tags":["config","auth","token"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}