DIYgod/RSSHub · warning · Error
没有获取到数据
Error message
没有获取到数据
What it means
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`.
Source
Thrown at lib/routes/issuehunt/funded.ts:30
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false,
},
name: 'Project Funded',
maintainers: ['running-grass'],
handler,
};
async function handler(ctx) {
const { username, repo } = ctx.req.param();
const response = await got(`https://issuehunt.io/apis/pages/repos/show?repositoryOwnerName=${username}&repositoryName=${repo}`);
const { issues } = response.data;
if (issues === undefined) {
throw new Error('没有获取到数据');
}
const md = MarkdownIt({
html: true,
});
return {
title: `Issue Hunt 的悬赏 -- ${username}/${repo}`,
link: `https://issuehunt.io/r/${username}/${repo}`,
description: '',
item: issues.map((item) => ({
title: item.title,
description: md.render(item.body),
pubDate: item.fundedAt,
link: `https://issuehunt.io/r/${username}/${repo}/issues/${item.number}`,
author: item.userName,
})),
};
}View on GitHub (pinned to bed535e087)
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.
Example fix
// before
const { issues } = response.data;
if (issues === undefined) {
throw new Error('没有获取到数据');
}
// after (graceful empty feed)
const issues = response.data?.issues ?? [];
// ... proceed; an empty issues array yields an empty feed Defensive patterns
Strategy: validation
Validate before calling
const r = await got(url);
if (!r.data || !Array.isArray(r.data.issues)) {
throw new Error(`IssueHunt returned no issues for ${username}/${repo}`);
} Type guard
const hasIssues = (d: any): d is {issues: any[]} =>
d && Array.isArray(d.issues); Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Failed to fetch channel data from Castbox
- Failed to fetch episode list from Castbox
- No posts found for the given IDs
- No ${type} found for slug: ${slug}
- API error: ${response.message}
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/c4ccb9872d46d894.
Report an issue: GitHub.