DIYgod/RSSHub · error · InvalidParameterError
Such feed is not supported.
Error message
Such feed is not supported.
What it means
Mirror of error 281 but on the Instagram web-API route handler. Thrown as `InvalidParameterError` when the `category` path param is not in `['user', 'tags']`. Same allow-list, different transport (web API with cookies instead of private login).
Source
Thrown at lib/routes/instagram/web-api/index.ts:45
handler,
description: `::: tip
You may need to setup cookie for a less restrictive rate limit and private profiles.
:::
| User timeline | Hashtag |
| ------------- | ------- |
| user | tags |`,
};
async function handler(ctx) {
// if (!config.instagram || !config.instagram.cookie) {
// throw new ConfigNotFoundError('Instagram RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
// }
const availableCategories = ['user', 'tags'];
const { category, key } = ctx.req.param();
const { cookie } = config.instagram;
if (!availableCategories.includes(category)) {
throw new InvalidParameterError('Such feed is not supported.');
}
let cookieJar: any = await cache.get('instagram:cookieJar');
// const wwwClaimV2 = await cache.get('instagram:wwwClaimV2');
const cacheMiss = !cookieJar;
if (cacheMiss) {
cookieJar = new CookieJar();
if (cookie) {
for await (const c of cookie.split('; ')) {
await cookieJar.setCookie(c, COOKIE_URL);
}
}
} else {
cookieJar = CookieJar.fromJSON(cookieJar);
}
if (/* !wwwClaimV2 &&*/ cookie && !(await checkLogin(cookieJar))) {View on GitHub (pinned to bed535e087)
Solutions
- Use `/instagram/user/:user` or `/instagram/tags/:tag`.
- Add a new category to `availableCategories` in lib/routes/instagram/web-api/index.ts and implement its switch branch if extending the route.
Example fix
// caller fix // GET /instagram/user/<username>
Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED = new Set(['user','tags']);
if (!ALLOWED.has(category)) {
throw new InvalidParameterError(`Category must be one of: ${[...ALLOWED].join(', ')}`);
} Type guard
const isInstagramCategory = (c: string): c is 'user'|'tags' => c === 'user' || c === 'tags';
Prevention
- Share the allow-list between route metadata and the handler.
- Validate before touching the cookie jar / network.
When it happens
Trigger: Request to the web-API Instagram route with a category other than `user` or `tags`, e.g. `/instagram/location/...`. Fires at web-api/index.ts:45 before any network call.
Common situations: User mistakes the category name (e.g. `profile`, `account`, `reels`); outdated docs; typo in a feed URL.
Related errors
- Such feed is not supported.
- Invalid type: ${paramType}. Please refer to [the documentati
- Invalid language
- Invalid language
- invalid sort parameter, should be `hot`, `created`, or `repl
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/62f2b3844e3db91f.
Report an issue: GitHub.