{"record":{"id":"442e30bc8240ef5b","repo":"DIYgod/RSSHub","slug":"recommendlist-message-442e30","errorCode":null,"errorMessage":"${recommendList.message}","messagePattern":"\\$\\{recommendList\\.message\\}","errorType":"exception","errorClass":"Error","httpStatus":503,"severity":"error","filePath":"lib/routes/dxy/special.ts","lineNumber":71,"sourceCode":"        `dxy:special:recommend-list-v3:${specialId}`,\n        async () => {\n            const listParams = {\n                specialId,\n                requestType: 'h5',\n                pageNum: '1',\n                pageSize: limit,\n                timestamp: Date.now(),\n                noncestr: generateNonce(8, 'number'),\n            };\n\n            const recommendList = await ofetch(`${phoneBaseUrl}/newh5/bbs/special/post/recommend-list-v3`, {\n                query: {\n                    ...listParams,\n                    sign: sign(listParams),\n                },\n            });\n            if (recommendList.code !== 'success') {\n                throw new Error(recommendList.message);\n            }\n            return recommendList.data;\n        },\n        config.cache.routeExpire,\n        false\n    )) as RecommendListData;\n\n    const list = recommendList.result.map((item) => {\n        const { postInfo, dataTime, entityId } = item;\n        return {\n            title: postInfo.subject,\n            description: postInfo.simpleBody,\n            pubDate: parseDate(dataTime, 'x'),\n            author: postInfo.postUser.nickname,\n            category: [postInfo.postSpecial.specialName],\n            link: `${webBaseUrl}/bbs/newweb/pc/post/${entityId}`,\n            postId: entityId,\n        };","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/dxy/special.ts#L53-L89","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the specialId exists by opening `https://www.dxy.cn/bbs/special?specialId=<id>` in a browser.","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.","If the error is intermittent (rate-limiting), wait and retry or reduce request frequency.","Inspect the full API response body (add logging) to read the exact upstream `message` and code for diagnosis."],"exampleFix":"// before\nif (recommendList.code !== 'success') {\n    throw new Error(recommendList.message);\n}\n\n// after — surface the code and endpoint for faster diagnosis\nif (recommendList.code !== 'success') {\n    throw new Error(`DXY recommend-list-v3 error (code=${recommendList.code}): ${recommendList.message}`);\n}","handlingStrategy":"try-catch","validationCode":"// Validate specialId is numeric before calling the API\nconst specialId = ctx.req.param('specialId');\nif (!/^\\d+$/.test(specialId)) {\n    throw new InvalidParameterError('specialId must be numeric');\n}","typeGuard":"// Type guard for the DXY API success response\nfunction isDxySuccessResponse(res: unknown): res is { code: 'success'; data: RecommendListData } {\n    return typeof res === 'object' && res !== null &&\n        (res as any).code === 'success' &&\n        (res as any).data !== undefined;\n}","tryCatchPattern":"try {\n    const recommendList = await ofetch(url, { query });\n    if (recommendList.code !== 'success') {\n        throw new Error(`DXY API rejected: ${recommendList.message}`);\n    }\n} catch (e) {\n    // Distinguish network errors from API-level rejections\n    if (e instanceof Error && e.message.startsWith('DXY API rejected')) {\n        // API-level: likely specialId or signing issue\n        ctx.header('Cache-Control', 'no-store');\n    }\n    throw e;\n}","preventionTips":["Keep the APP_SIGN_KEY in sync with the current DXY app build.","Validate specialId format before making the signed API call.","Monitor for anti-crawler responses by logging non-success codes.","Use cache to reduce request frequency and avoid rate-limit triggers."],"tags":["api-passthrough","upstream-signing","anti-crawler","dxy"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}