DIYgod/RSSHub · error · Error
${detail.message}
Error message
${detail.message} What it means
Thrown by the DXY (Dingxiangyuan) board detail API call when the response `code` field is not 'success'. The route calls the `/bbsapi/bbs/board/detail` endpoint with signed parameters (HMAC-style signature). If the API rejects the request (invalid boardId, expired signature, server error), it returns a non-success code with a `message` field describing the error, which is re-thrown verbatim.
Source
Thrown at lib/routes/dxy/board.ts:47
async function handler(ctx) {
const { boardId } = ctx.req.param();
const { limit = '20' } = ctx.req.query();
const boardDetail = (await cache.tryGet(`dxy:board:detail:${boardId}`, async () => {
const detailParams = {
boardId,
timestamp: Date.now(),
noncestr: generateNonce(8, 'number'),
};
const detail = await ofetch(`${phoneBaseUrl}/bbsapi/bbs/board/detail`, {
query: {
...detailParams,
sign: sign(detailParams),
},
});
if (detail.code !== 'success') {
throw new Error(detail.message);
}
return detail.data;
})) as BoardInfo;
const boardList = (await cache.tryGet(
`dxy:board:list:${boardId}`,
async () => {
const listParams = {
boardId,
postType: '0',
orderType: '1',
pageNum: '1',
pageSize: limit,
timestamp: Date.now(),
noncestr: generateNonce(8, 'number'),
};
const recommendList = await ofetch(`${phoneBaseUrl}/bbsapi/bbs/board/post/list`, {View on GitHub (pinned to bed535e087)
Solutions
- Verify the boardId by visiting the corresponding DXY BBS board page.
- Retry — the error may be transient (rate limiting or maintenance).
- If the signing algorithm changed, check for RSSHub updates to the sign() function.
- Inspect the thrown message for the specific upstream error reason.
Example fix
// before
if (detail.code !== 'success') {
throw new Error(detail.message);
}
// after — include request context
if (detail.code !== 'success') {
throw new Error(`DXY board detail API error (boardId=${boardId}, code=${detail.code}): ${detail.message}`);
} Defensive patterns
Strategy: try-catch
Type guard
interface DxyApiResponse<T> {
code: string;
message: string;
data: T;
}
function isDxySuccess<T>(resp: DxyApiResponse<T>): resp is DxyApiResponse<T> & { code: 'success' } {
return resp.code === 'success';
} Try / catch
try {
const feed = await fetch(`${rsshubUrl}/dxy/bbs/board/${boardId}`);
} catch (e) {
// The error message is the upstream API's message field
console.error(`DXY board detail API error for boardId ${boardId}: ${e.message}`);
if (e.message.includes('sign') || e.message.includes('签名')) {
// Signature issue — may need RSSHub update
}
throw e;
} Prevention
- Verify the boardId by visiting the DXY BBS board page in a browser.
- Retry after a delay — DXY API errors can be transient.
- If the error mentions signature/signing, the signing algorithm may have changed — check for RSSHub updates.
- Inspect the upstream message for the specific error reason.
When it happens
Trigger: The boardId doesn't exist or has been removed; the request signature (`sign()`) is invalid due to a clock skew or algorithm change; the API server is under maintenance; rate limiting returns an error code with a message.
Common situations: Incorrect boardId from an outdated URL; the signing algorithm or secret has been rotated by DXY; server-side rate limiting or temporary outage.
Related errors
- ${recommendList.message}
- ${detail.message}
- ${userInfo.message}
- ${postList.message}
- Invalid API response: ${JSON.stringify(response)}
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/692668344eaef8b4.
Report an issue: GitHub.