DIYgod/RSSHub · error · InvalidParameterError

Such feed is not supported.

Error message

Such feed is not supported.

What it means

Thrown by the Instagram private-API route handler when the `category` path parameter is not in the hardcoded allow-list `['user', 'tags']`. It is an `InvalidParameterError`, meaning the route intentionally rejects unsupported categories early before attempting any authenticated API call. The private API client (instagram-private-api) supports many more feeds, but only `user` and `tags` are wired up here.

Source

Thrown at lib/routes/instagram/private-api/index.ts:121

        supportScihub: false,
    },
    name: 'User Profile / Hashtag - Private API',
    maintainers: ['oppilate', 'DIYgod'],
    handler,
};

async function handler(ctx) {
    // https://github.com/dilame/instagram-private-api#feeds
    // const availableCategories = ["accountFollowers", "accountFollowing", "news",
    //     "discover", "pendingFriendships", "blockedUsers", "directInbox", "directPending",
    //     "directThread", "user", "tag", "location", "mediaComments", "reelsMedia", "reelsTray",
    //     "timeline", "musicTrending", "musicSearch", "musicGenre", "musicMood", "usertags", "saved"];
    const availableCategories = ['user', 'tags'];
    // Unique key for a feed category
    // e.g. username for user feed
    const { category, key } = ctx.req.param();
    if (!availableCategories.includes(category)) {
        throw new InvalidParameterError('Such feed is not supported.');
    }

    if (config.instagram && config.instagram.proxy) {
        ig.state.proxyUrl = config.instagram.proxy;
    }

    await login(ig, cache);

    let data;
    try {
        data = await loadContent(category, key);
    } catch (error) {
        logger.error(`Instagram error: ${error}`);
        throw error;
    }

    return {
        title: data.feedTitle,

View on GitHub (pinned to bed535e087)

Solutions

  1. Use one of the supported categories: `/instagram/user/:username` or `/instagram/tags/:tag`.
  2. If a new category is genuinely needed, add it to the `availableCategories` array in lib/routes/instagram/private-api/index.ts and implement the `loadContent` branch for it.
  3. Check the route's `description`/`example` field for the canonical paths.

Example fix

// before
const availableCategories = ['user', 'tags'];
if (!availableCategories.includes(category)) {
    throw new InvalidParameterError('Such feed is not supported.');
}
// after  (caller fix — use a supported path)
// GET /instagram/user/<username>   instead of /instagram/profile/<username>
Defensive patterns

Strategy: validation

Validate before calling

const ALLOWED = new Set(['user','tags']);
if (!ALLOWED.has(category)) {
  // surface a helpful, typed error instead of letting the route 500
  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

When it happens

Trigger: A request like `/instagram/:category/:key` where `category` is anything other than `user` or `tags` (e.g. `/instagram/location/...`, `/instagram/reels/...`, or a typo like `/instagram/users/...`). Fires at private-api/index.ts:121 before login.

Common situations: User mistypes the category; user copy-pastes a route from old docs that referenced a wider category list (the commented-out list at the top lists `accountFollowers`, `timeline`, `reelsMedia`, etc., which are NOT enabled); outdated third-party docs reference unsupported categories.

Related errors


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/ba1507a265b96b29. Report an issue: GitHub.