DIYgod/RSSHub · error · Error

${recommendList.message}

Error message

${recommendList.message}

What it means

Thrown when the DXY (Dingxiangyuan) recommend-list-v3 API returns a response whose `code` field is not `'success'`. The route signs requests with a SHA1 hash over sorted query params plus an `APP_SIGN_KEY`, then rethrows the upstream `message` verbatim. This is a passthrough of any upstream rejection — invalid specialId, expired sign, anti-crawler block, or server-side error.

Source

Thrown at lib/routes/dxy/special.ts:71

        `dxy:special:recommend-list-v3:${specialId}`,
        async () => {
            const listParams = {
                specialId,
                requestType: 'h5',
                pageNum: '1',
                pageSize: limit,
                timestamp: Date.now(),
                noncestr: generateNonce(8, 'number'),
            };

            const recommendList = await ofetch(`${phoneBaseUrl}/newh5/bbs/special/post/recommend-list-v3`, {
                query: {
                    ...listParams,
                    sign: sign(listParams),
                },
            });
            if (recommendList.code !== 'success') {
                throw new Error(recommendList.message);
            }
            return recommendList.data;
        },
        config.cache.routeExpire,
        false
    )) as RecommendListData;

    const list = recommendList.result.map((item) => {
        const { postInfo, dataTime, entityId } = item;
        return {
            title: postInfo.subject,
            description: postInfo.simpleBody,
            pubDate: parseDate(dataTime, 'x'),
            author: postInfo.postUser.nickname,
            category: [postInfo.postSpecial.specialName],
            link: `${webBaseUrl}/bbs/newweb/pc/post/${entityId}`,
            postId: entityId,
        };

View on GitHub (pinned to bed535e087)

Solutions

  1. Verify the specialId exists by opening `https://www.dxy.cn/bbs/special?specialId=<id>` in a browser.
  2. Check whether the `APP_SIGN_KEY` in lib/routes/dxy/utils.ts still matches the current DXY app build; if the app updated, reverse-engineer the new key.
  3. If the error is intermittent (rate-limiting), wait and retry or reduce request frequency.
  4. Inspect the full API response body (add logging) to read the exact upstream `message` and code for diagnosis.

Example fix

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

// after — surface the code and endpoint for faster diagnosis
if (recommendList.code !== 'success') {
    throw new Error(`DXY recommend-list-v3 error (code=${recommendList.code}): ${recommendList.message}`);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate specialId is numeric before calling the API
const specialId = ctx.req.param('specialId');
if (!/^\d+$/.test(specialId)) {
    throw new InvalidParameterError('specialId must be numeric');
}

Type guard

// Type guard for the DXY API success response
function isDxySuccessResponse(res: unknown): res is { code: 'success'; data: RecommendListData } {
    return typeof res === 'object' && res !== null &&
        (res as any).code === 'success' &&
        (res as any).data !== undefined;
}

Try / catch

try {
    const recommendList = await ofetch(url, { query });
    if (recommendList.code !== 'success') {
        throw new Error(`DXY API rejected: ${recommendList.message}`);
    }
} catch (e) {
    // Distinguish network errors from API-level rejections
    if (e instanceof Error && e.message.startsWith('DXY API rejected')) {
        // API-level: likely specialId or signing issue
        ctx.header('Cache-Control', 'no-store');
    }
    throw e;
}

Prevention

When it happens

Trigger: The handler requests `${phoneBaseUrl}/newh5/bbs/special/post/recommend-list-v3` with signed params (specialId, pageNum, pageSize, timestamp, noncestr). If the special board was deleted, the specialId is wrong, the signing key drifts, or DXY rate-limits the IP, `recommendList.code !== 'success'` fires and `recommendList.message` is thrown.

Common situations: An outdated or changed `APP_SIGN_KEY` constant in utils.ts causes every signed request to be rejected. A user passes a non-existent or removed specialId (e.g., from a stale bookmark). DXY deploys anti-crawler measures that flag RSSHub's request pattern. The timestamp/noncestr window expires on cached retry.

Related errors


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