DIYgod/RSSHub · error · Error

${userInfo.message}

Error message

${userInfo.message}

What it means

Thrown by the DXY user profile thread route when the user-info API (`/bbs/newweb/personal-page/user-info`) returns a non-success `code`. The route fetches user metadata before fetching their post list. If the userId is invalid, the signature is rejected, or the user account is restricted, the API returns an error code with a `message` that is re-thrown.

Source

Thrown at lib/routes/dxy/profile/thread.ts:51

    const userId = ctx.req.param('userId');
    const { limit = '30' } = ctx.req.query();

    const userInfo = await cache.tryGet(`dxy:user-info:${userId}`, async () => {
        const userInfoParams = {
            userId,
            serverTimestamp: Date.now(),
            timestamp: Date.now(),
            noncestr: generateNonce(8, 'number'),
        };

        const { data: userInfo } = await got(`${webBaseUrl}/bbs/newweb/personal-page/user-info`, {
            searchParams: {
                ...userInfoParams,
                sign: sign(userInfoParams),
            },
        });
        if (userInfo.code !== 'success') {
            throw new Error(userInfo.message);
        }

        return userInfo.data;
    });

    const postList = await cache.tryGet(
        `dxy:user:post:${userId}`,
        async () => {
            const postListParams = {
                userId,
                type: '0',
                pageNum: '1',
                pageSize: limit,
                serverTimestamp: Date.now(),
                timestamp: Date.now(),
                noncestr: generateNonce(8, 'number'),
            };

View on GitHub (pinned to bed535e087)

Solutions

  1. Verify the userId by visiting the user's DXY profile page in a browser.
  2. Retry — may be transient.
  3. Inspect the upstream message for the specific error.
  4. If persistent, check for RSSHub updates.

Example fix

// before
if (userInfo.code !== 'success') {
    throw new Error(userInfo.message);
}

// after
if (userInfo.code !== 'success') {
    throw new Error(`DXY user-info API error (userId=${userId}, code=${userInfo.code}): ${userInfo.message}`);
}
Defensive patterns

Strategy: try-catch

Type guard

function isDxyUserInfoSuccess(resp: unknown): boolean {
    return typeof resp === 'object' && resp !== null && (resp as any).code === 'success';
}

Try / catch

try {
    const feed = await fetch(`${rsshubUrl}/dxy/bbs/profile/thread/${userId}`);
} catch (e) {
    console.error(`DXY user-info API error for userId ${userId}: ${e.message}`);
    throw e;
}

Prevention

When it happens

Trigger: The userId doesn't exist or has been deleted; the user's profile is private or restricted; signature validation fails; rate limiting; the user-info API endpoint structure changed.

Common situations: Incorrect userId from an outdated URL; the user account was suspended; signing algorithm mismatch; transient API error.

Related errors


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