{"record":{"id":"62f2b3844e3db91f","repo":"DIYgod/RSSHub","slug":"such-feed-is-not-supported-62f2b3","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/web-api/index.ts","lineNumber":45,"sourceCode":"    handler,\n    description: `::: tip\nYou may need to setup cookie for a less restrictive rate limit and private profiles.\n:::\n\n| User timeline | Hashtag |\n| ------------- | ------- |\n| user          | tags    |`,\n};\n\nasync function handler(ctx) {\n    // if (!config.instagram || !config.instagram.cookie) {\n    //     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>');\n    // }\n    const availableCategories = ['user', 'tags'];\n    const { category, key } = ctx.req.param();\n    const { cookie } = config.instagram;\n    if (!availableCategories.includes(category)) {\n        throw new InvalidParameterError('Such feed is not supported.');\n    }\n\n    let cookieJar: any = await cache.get('instagram:cookieJar');\n    // const wwwClaimV2 = await cache.get('instagram:wwwClaimV2');\n    const cacheMiss = !cookieJar;\n\n    if (cacheMiss) {\n        cookieJar = new CookieJar();\n        if (cookie) {\n            for await (const c of cookie.split('; ')) {\n                await cookieJar.setCookie(c, COOKIE_URL);\n            }\n        }\n    } else {\n        cookieJar = CookieJar.fromJSON(cookieJar);\n    }\n\n    if (/* !wwwClaimV2 &&*/ cookie && !(await checkLogin(cookieJar))) {","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/instagram/web-api/index.ts#L27-L63","documentation":"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).","triggerScenarios":"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.","commonSituations":"User mistakes the category name (e.g. `profile`, `account`, `reels`); outdated docs; typo in a feed URL.","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."],"exampleFix":"// caller fix\n// GET /instagram/user/<username>","handlingStrategy":"validation","validationCode":"const ALLOWED = new Set(['user','tags']);\nif (!ALLOWED.has(category)) {\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":["Share the allow-list between route metadata and the handler.","Validate before touching the cookie jar / network."],"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"}