DIYgod/RSSHub · error · InvalidParameterError

This creator does not exist.

Error message

This creator does not exist.

What it means

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.

Source

Thrown at lib/routes/myfans/utils.ts:24

const apiBaseUrl = 'https://api.myfans.jp';
export const baseUrl = 'https://myfans.jp';

const headers = {
    'google-ga-data': 'event328',
};

export const showByUsername = (username: string) =>
    cache.tryGet(`myfans:account:${username}`, async () => {
        const accountInfo = await ofetch<UserProfile>(`${apiBaseUrl}/api/v2/users/show_by_username`, {
            headers,
            query: {
                username,
            },
        });

        if (!accountInfo.id) {
            throw new InvalidParameterError('This creator does not exist.');
        }

        return accountInfo;
    }) as Promise<UserProfile>;

export const getPostByAccountId = async (accountId) => {
    const post = await ofetch(`${apiBaseUrl}/api/v2/users/${accountId}/posts`, {
        headers,
        query: {
            sort_key: 'publish_start_at',
            page: 1,
        },
    });

    return post.data as Promise<Post[]>;
};

View on GitHub (pinned to bed535e087)

Solutions

  1. Open https://myfans.jp/<username> in a browser — a 404/empty profile means the username is wrong.
  2. 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.
  3. 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.
  4. Find the creator's current username from their myfans profile link.
Defensive patterns

Strategy: type-guard

Validate before calling

const accountInfo = await ofetch<UserProfile>(`${apiBaseUrl}/api/v2/users/show_by_username`, { headers, query: { username } });
if (!accountInfo || !accountInfo.id) {
    throw new InvalidParameterError(`Creator '${username}' does not exist on myfans.`);
}

Type guard

function isExistingProfile(p: UserProfile | null | undefined): p is UserProfile {
    return !!p && typeof (p as any).id !== 'undefined' && (p as any).id !== null;
}

Prevention

When it happens

Trigger: 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.

Common situations: Username typo; creator deleted their account; creator changed username; the API changed to return a different shape (id nested elsewhere).

Related errors


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