{"record":{"id":"ba1507a265b96b29","repo":"DIYgod/RSSHub","slug":"such-feed-is-not-supported","errorCode":null,"errorMessage":"Such feed is not supported.","messagePattern":"Such feed is not supported\\.","errorType":"validation","errorClass":"InvalidParameterError","httpStatus":null,"severity":"error","filePath":"lib/routes/instagram/private-api/index.ts","lineNumber":121,"sourceCode":"        supportScihub: false,\n    },\n    name: 'User Profile / Hashtag - Private API',\n    maintainers: ['oppilate', 'DIYgod'],\n    handler,\n};\n\nasync function handler(ctx) {\n    // https://github.com/dilame/instagram-private-api#feeds\n    // const availableCategories = [\"accountFollowers\", \"accountFollowing\", \"news\",\n    //     \"discover\", \"pendingFriendships\", \"blockedUsers\", \"directInbox\", \"directPending\",\n    //     \"directThread\", \"user\", \"tag\", \"location\", \"mediaComments\", \"reelsMedia\", \"reelsTray\",\n    //     \"timeline\", \"musicTrending\", \"musicSearch\", \"musicGenre\", \"musicMood\", \"usertags\", \"saved\"];\n    const availableCategories = ['user', 'tags'];\n    // Unique key for a feed category\n    // e.g. username for user feed\n    const { category, key } = ctx.req.param();\n    if (!availableCategories.includes(category)) {\n        throw new InvalidParameterError('Such feed is not supported.');\n    }\n\n    if (config.instagram && config.instagram.proxy) {\n        ig.state.proxyUrl = config.instagram.proxy;\n    }\n\n    await login(ig, cache);\n\n    let data;\n    try {\n        data = await loadContent(category, key);\n    } catch (error) {\n        logger.error(`Instagram error: ${error}`);\n        throw error;\n    }\n\n    return {\n        title: data.feedTitle,","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/instagram/private-api/index.ts#L103-L139","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use one of the supported categories: `/instagram/user/:username` or `/instagram/tags/:tag`.","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.","Check the route's `description`/`example` field for the canonical paths."],"exampleFix":"// before\nconst availableCategories = ['user', 'tags'];\nif (!availableCategories.includes(category)) {\n    throw new InvalidParameterError('Such feed is not supported.');\n}\n// after  (caller fix — use a supported path)\n// GET /instagram/user/<username>   instead of /instagram/profile/<username>","handlingStrategy":"validation","validationCode":"const ALLOWED = new Set(['user','tags']);\nif (!ALLOWED.has(category)) {\n  // surface a helpful, typed error instead of letting the route 500\n  throw new InvalidParameterError(`Category must be one of: ${[...ALLOWED].join(', ')}`);\n}","typeGuard":"const isInstagramCategory = (c: string): c is 'user'|'tags' => c === 'user' || c === 'tags';","tryCatchPattern":null,"preventionTips":["Validate the category against the route's documented allow-list before building the request URL.","Keep the allow-list in one constant shared by the route definition and the handler so they cannot drift.","Document valid categories in the route's `description`."],"tags":["instagram","invalid-parameter","route-validation"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}