{"record":{"id":"c4ccb9872d46d894","repo":"DIYgod/RSSHub","slug":"error-c4ccb9","errorCode":null,"errorMessage":"没有获取到数据","messagePattern":"没有获取到数据","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"lib/routes/issuehunt/funded.ts","lineNumber":30,"sourceCode":"        requireConfig: false,\n        requirePuppeteer: false,\n        antiCrawler: false,\n        supportBT: false,\n        supportPodcast: false,\n        supportScihub: false,\n    },\n    name: 'Project Funded',\n    maintainers: ['running-grass'],\n    handler,\n};\n\nasync function handler(ctx) {\n    const { username, repo } = ctx.req.param();\n    const response = await got(`https://issuehunt.io/apis/pages/repos/show?repositoryOwnerName=${username}&repositoryName=${repo}`);\n\n    const { issues } = response.data;\n    if (issues === undefined) {\n        throw new Error('没有获取到数据');\n    }\n\n    const md = MarkdownIt({\n        html: true,\n    });\n    return {\n        title: `Issue Hunt 的悬赏 -- ${username}/${repo}`,\n        link: `https://issuehunt.io/r/${username}/${repo}`,\n        description: '',\n        item: issues.map((item) => ({\n            title: item.title,\n            description: md.render(item.body),\n            pubDate: item.fundedAt,\n            link: `https://issuehunt.io/r/${username}/${repo}/issues/${item.number}`,\n            author: item.userName,\n        })),\n    };\n}","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/issuehunt/funded.ts#L12-L48","documentation":"Thrown by IssueHunt's funded route when the IssueHunt API response for a repo does not contain an `issues` field (`response.data.issues === undefined`). Plain `Error('没有获取到数据')` ('No data retrieved'). Indicates the upstream API did not return bounty data for the requested `username/repo`.","triggerScenarios":"Request to `/issuehunt/funded/:username/:repo` where IssueHunt's endpoint `https://issuehunt.io/apis/pages/repos/show?repositoryOwnerName=...&repositoryName=...` returns a payload without `.issues` — repo not tracked, renamed, deleted, or the API changed shape.","commonSituations":"Repo does not exist on IssueHunt (it was never enrolled for bounties); repo was renamed/transferred; IssueHunt changed/removed the API; rate-limited or empty response; typo in username/repo.","solutions":["Verify the repo exists on IssueHunt by visiting `https://issuehunt.io/r/<username>/<repo>`.","Check the username/repo spelling against the GitHub canonical path.","If the API shape changed, inspect `response.data` and update the handler to read the new field.","Handle the empty case gracefully (return an empty feed) instead of throwing if that is the desired behavior."],"exampleFix":"// before\nconst { issues } = response.data;\nif (issues === undefined) {\n    throw new Error('没有获取到数据');\n}\n// after (graceful empty feed)\nconst issues = response.data?.issues ?? [];\n// ... proceed; an empty issues array yields an empty feed","handlingStrategy":"validation","validationCode":"const r = await got(url);\nif (!r.data || !Array.isArray(r.data.issues)) {\n  throw new Error(`IssueHunt returned no issues for ${username}/${repo}`);\n}","typeGuard":"const hasIssues = (d: any): d is {issues: any[]} =>\n    d && Array.isArray(d.issues);","tryCatchPattern":null,"preventionTips":["Validate the upstream payload shape before destructuring.","Return an empty feed for genuinely-empty repos instead of throwing, if that is the desired UX.","Verify repo exists on IssueHunt before requesting the API."],"tags":["issuehunt","upstream-api","not-found","data-shape"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}