DIYgod/RSSHub · error · InvalidParameterError
${baseInfo.name} is not available in this server region.
Error message
${baseInfo.name} is not available in this server region. What it means
The iQiyi album route fetches album metadata from iq.com and checks `album.cacheAlbumList`; if it has no keys the album is treated as unavailable in the RSSHub server's region and InvalidParameterError is thrown with the album name. Region is determined by where RSSHub itself runs, not by a user parameter.
Source
Thrown at lib/routes/iqiyi/album.tsx:44
可抓取內容根据服务器所在地区而定
:::`,
};
async function handler(ctx) {
const id = ctx.req.param('id');
const { data: response } = await got(`https://www.iq.com/album/${id}`);
const $ = load(response);
const nextData = JSON.parse($('#__NEXT_DATA__').text());
const { album } = nextData.props.initialState;
const {
data: { data: baseInfo },
} = await got(`https://pcw-api.iqiyi.com/album/album/baseinfo/${album.videoAlbumInfo.albumId}`);
if (Object.keys(album.cacheAlbumList).length === 0) {
throw new InvalidParameterError(`${baseInfo.name} is not available in this server region.`);
}
let pos = 1;
let hasMore: boolean;
let epgs: any[] = [];
do {
const {
data: { data },
// eslint-disable-next-line no-await-in-loop
} = await got(`https://pcw-api.iq.com/api/v2/episodeListSource/${album.videoAlbumInfo.albumId}`, {
searchParams: {
platformId: 3,
modeCode: 'intl',
langCode: 'zh_cn',
endOrder: album.videoAlbumInfo.maxOrder,
startOrder: pos,
},
});View on GitHub (pinned to bed535e087)
Solutions
- Deploy or proxy RSSHub through an egress in a region where the album is available on iq.com.
- Verify the album plays on iq.com from your server's region before relying on the feed.
- If unavailable everywhere you can deploy, choose a different album.
Defensive patterns
Strategy: retry
Validate before calling
// Region is server-side; pre-check album availability from the server's egress
async function albumAvailableInRegion(id: string): Promise<boolean> {
const { data } = await got(`https://www.iq.com/album/${id}`);
const $ = load(data);
const next = JSON.parse($('#__NEXT_DATA__').text());
return Object.keys(next.props.initialState.album.cacheAlbumList).length > 0;
} Try / catch
try {
await buildAlbumFeed(id);
} catch (e) {
// retry through a different egress / proxy region, then surface geo-block clearly
throw e;
} Prevention
- Deploy RSSHub behind an egress in a region iq.com serves; or proxy per-route.
- Detect empty cacheAlbumList before rendering and return a clear geo-availability error.
- Do not retry in a loop from the same blocked region — it will keep failing.
When it happens
Trigger: The album is geo-restricted and the RSSHub server's egress IP is in a region iq.com does not serve that album to; the album was delisted; cross-region licensing changed.
Common situations: Self-hosting in a region blocked for that title; a VPS in a restricted country; content that is CN-only or overseas-only.
Related errors
- Unknown region: ${region}
- Unknown category for ${region}: ${category}
- Unsupported region: ${region}
- Unknown region: ${region}
- Unknown region: ${region}
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/2565db8403c4b162.
Report an issue: GitHub.