{"record":{"id":"11f27565d4fdad8b","repo":"DIYgod/RSSHub","slug":"this-creator-does-not-exist","errorCode":null,"errorMessage":"This creator does not exist.","messagePattern":"This creator does not exist\\.","errorType":"validation","errorClass":"InvalidParameterError","httpStatus":503,"severity":"error","filePath":"lib/routes/myfans/utils.ts","lineNumber":24,"sourceCode":"\nconst apiBaseUrl = 'https://api.myfans.jp';\nexport const baseUrl = 'https://myfans.jp';\n\nconst headers = {\n    'google-ga-data': 'event328',\n};\n\nexport const showByUsername = (username: string) =>\n    cache.tryGet(`myfans:account:${username}`, async () => {\n        const accountInfo = await ofetch<UserProfile>(`${apiBaseUrl}/api/v2/users/show_by_username`, {\n            headers,\n            query: {\n                username,\n            },\n        });\n\n        if (!accountInfo.id) {\n            throw new InvalidParameterError('This creator does not exist.');\n        }\n\n        return accountInfo;\n    }) as Promise<UserProfile>;\n\nexport const getPostByAccountId = async (accountId) => {\n    const post = await ofetch(`${apiBaseUrl}/api/v2/users/${accountId}/posts`, {\n        headers,\n        query: {\n            sort_key: 'publish_start_at',\n            page: 1,\n        },\n    });\n\n    return post.data as Promise<Post[]>;\n};\n","sourceCodeStart":6,"sourceCodeEnd":41,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/myfans/utils.ts#L6-L41","documentation":"Thrown as InvalidParameterError by showByUsername() in the myfans utils when the api.myfans.jp endpoint /api/v2/users/show_by_username returns a UserProfile object whose `id` is falsy. The result is cached under 'myfans:account:<username>'. A missing id signals the account doesn't exist (deleted, renamed, or username typo), so the route refuses to continue.","triggerScenarios":"A myfans route calls showByUsername(username); the API responds 200-ish with an object lacking `id`. Fires for a non-existent username, a banned/deleted creator, or a renamed account. The cached result means a stale bad lookup may persist until the cache TTL expires.","commonSituations":"Username typo; creator deleted their account; creator changed username; the API changed to return a different shape (id nested elsewhere).","solutions":["Open https://myfans.jp/<username> in a browser — a 404/empty profile means the username is wrong.","If you previously hit a bad username, the cached 'no account' may linger; clear the RSSHub cache key 'myfans:account:<username>' or wait for TTL.","If the username is correct but the API shape changed, verify with curl to https://api.myfans.jp/api/v2/users/show_by_username?username=<username> (note the google-ga-data header) and inspect the JSON.","Find the creator's current username from their myfans profile link."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"const accountInfo = await ofetch<UserProfile>(`${apiBaseUrl}/api/v2/users/show_by_username`, { headers, query: { username } });\nif (!accountInfo || !accountInfo.id) {\n    throw new InvalidParameterError(`Creator '${username}' does not exist on myfans.`);\n}","typeGuard":"function isExistingProfile(p: UserProfile | null | undefined): p is UserProfile {\n    return !!p && typeof (p as any).id !== 'undefined' && (p as any).id !== null;\n}","tryCatchPattern":null,"preventionTips":["Verify the username opens a real profile at https://myfans.jp/<username> before subscribing.","Cache negative lookups with a short TTL so renamed/deleted accounts don't stick.","Distinguish 'not found' from API shape changes by inspecting the raw JSON when debugging."],"tags":["invalid-parameter","not-found","username","cache","myfans"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}