{"record":{"id":"8057081ebf91b2eb","repo":"DIYgod/RSSHub","slug":"userinfo-message","errorCode":null,"errorMessage":"${userInfo.message}","messagePattern":"\\$\\{userInfo\\.message\\}","errorType":"exception","errorClass":"Error","httpStatus":503,"severity":"error","filePath":"lib/routes/dxy/profile/thread.ts","lineNumber":51,"sourceCode":"    const userId = ctx.req.param('userId');\n    const { limit = '30' } = ctx.req.query();\n\n    const userInfo = await cache.tryGet(`dxy:user-info:${userId}`, async () => {\n        const userInfoParams = {\n            userId,\n            serverTimestamp: Date.now(),\n            timestamp: Date.now(),\n            noncestr: generateNonce(8, 'number'),\n        };\n\n        const { data: userInfo } = await got(`${webBaseUrl}/bbs/newweb/personal-page/user-info`, {\n            searchParams: {\n                ...userInfoParams,\n                sign: sign(userInfoParams),\n            },\n        });\n        if (userInfo.code !== 'success') {\n            throw new Error(userInfo.message);\n        }\n\n        return userInfo.data;\n    });\n\n    const postList = await cache.tryGet(\n        `dxy:user:post:${userId}`,\n        async () => {\n            const postListParams = {\n                userId,\n                type: '0',\n                pageNum: '1',\n                pageSize: limit,\n                serverTimestamp: Date.now(),\n                timestamp: Date.now(),\n                noncestr: generateNonce(8, 'number'),\n            };\n","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/dxy/profile/thread.ts#L33-L69","documentation":"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.","triggerScenarios":"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.","commonSituations":"Incorrect userId from an outdated URL; the user account was suspended; signing algorithm mismatch; transient API error.","solutions":["Verify the userId by visiting the user's DXY profile page in a browser.","Retry — may be transient.","Inspect the upstream message for the specific error.","If persistent, check for RSSHub updates."],"exampleFix":"// before\nif (userInfo.code !== 'success') {\n    throw new Error(userInfo.message);\n}\n\n// after\nif (userInfo.code !== 'success') {\n    throw new Error(`DXY user-info API error (userId=${userId}, code=${userInfo.code}): ${userInfo.message}`);\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isDxyUserInfoSuccess(resp: unknown): boolean {\n    return typeof resp === 'object' && resp !== null && (resp as any).code === 'success';\n}","tryCatchPattern":"try {\n    const feed = await fetch(`${rsshubUrl}/dxy/bbs/profile/thread/${userId}`);\n} catch (e) {\n    console.error(`DXY user-info API error for userId ${userId}: ${e.message}`);\n    throw e;\n}","preventionTips":["Verify the userId by visiting the user's DXY profile page.","Retry after a delay — transient errors are common with signed API requests.","If the error mentions signature, the signing algorithm may have rotated.","Inspect the upstream message for the specific error reason."],"tags":["dxy","api-error","signed-request","response-validation","user-profile"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}