{"record":{"id":"d44c369387bc1eb7","repo":"DIYgod/RSSHub","slug":"couldn-t-find-this-hashtag","errorCode":null,"errorMessage":"Couldn't find this hashtag.","messagePattern":"Couldn't find this hashtag\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/routes/fansly/utils.tsx","lineNumber":59,"sourceCode":"            contentSearch: '',\n            'ngsw-bypass': true,\n        },\n    });\n\n    return timeline.response;\n};\n\nconst getTagId = (tag) =>\n    cache.tryGet(`fansly:tag:${tag.toLowerCase()}`, async () => {\n        const { data: tagResponse } = await got(`${apiBaseUrl}/api/v1/contentdiscovery/media/tag`, {\n            searchParams: {\n                tag,\n                'ngsw-bypass': true,\n            },\n        });\n\n        if (!tagResponse.response.mediaOfferSuggestionTag) {\n            throw new Error(\"Couldn't find this hashtag.\");\n        }\n\n        return tagResponse.response.mediaOfferSuggestionTag.id;\n    });\n\nconst getTagSuggestion = async (tagId) => {\n    const { data: suggestionResponse } = await got(`${apiBaseUrl}/api/v1/contentdiscovery/media/suggestionsnew`, {\n        searchParams: {\n            before: 0,\n            after: 0,\n            tagIds: tagId,\n            limit: 25,\n            offset: 0,\n            'ngsw-bypass': true,\n        },\n    });\n\n    return suggestionResponse.response;","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/fansly/utils.tsx#L41-L77","documentation":"getTagId queries Fansly's content-discovery tag endpoint and caches under `fansly:tag:<tag>`. If `response.mediaOfferSuggestionTag` is falsy the handler throws a generic Error (note: not InvalidParameterError, unlike the account lookup). An empty suggestion means Fansly has no matching tag entry.","triggerScenarios":"`/fansly/hashtag/<tag>` where <tag> does not match any Fansly suggestion entry — typos, unused tags, or tags that exist only as free-text.","commonSituations":"Typo; the tag is too obscure to have a suggestion entry; a stale cached negative result.","solutions":["Verify the tag spelling on fansly.com and use the canonical suggestion text.","Clear or wait out the `fansly:tag:<wrong>` cache entry before retrying.","When patching the route, consider throwing InvalidParameterError for consistency with the account lookup."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"async function fanslyTagExists(tag: string): Promise<boolean> {\n  const { data } = await got(`${apiBaseUrl}/api/v1/contentdiscovery/media/tag`, { searchParams: { tag, 'ngsw-bypass': true } });\n  return Boolean(data.response.mediaOfferSuggestionTag);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Clear the `fansly:tag:<wrong>` cache key before retrying with a corrected tag.","Throw InvalidParameterError (not generic Error) for consistency with the account lookup."],"tags":["validation","not-found","cache"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}