{"record":{"id":"59ee1368d3b95e06","repo":"DIYgod/RSSHub","slug":"responsebody-code-responsebody-59ee13","errorCode":null,"errorMessage":"接口错误，错误代码:${responseBody.code},错误原因:${responseBody.msg}","messagePattern":"接口错误，错误代码:(.+?),错误原因:(.+?)","errorType":"exception","errorClass":"Error","httpStatus":503,"severity":"error","filePath":"lib/routes/nowcoder/interview.ts","lineNumber":44,"sourceCode":"    description: '牛客面试经验',\n    maintainers: ['xia0ne'],\n    handler,\n    url: 'nowcoder.com/',\n};\nasync function handler(ctx) {\n    const jobId = ctx.req.param('jobId');\n\n    const link = `https://gw-c.nowcoder.com/api/sparta/job-experience/experience/job/list?_=${Date.now()}`;\n    const payload = {\n        jobId,\n        level: 3,\n        order: 3,\n        page: 1,\n    };\n\n    const responseBody = (await got.post(link, { json: payload })).data;\n    if (responseBody.code !== 0) {\n        throw new Error(`接口错误，错误代码:${responseBody.code},错误原因:${responseBody.msg}`);\n    }\n\n    const items = (responseBody.data.records ?? [])\n        .map((r) => r?.momentData)\n        .filter((m) => m?.uuid)\n        .map((m) => ({\n            title: m.title || m.content || '面经',\n            description: m.content ?? '',\n            link: `https://www.nowcoder.com/feed/main/detail/${m.uuid}`,\n            pubDate: parseDate(m.createdAt),\n        }));\n\n    return {\n        title: '牛客网-面试经验',\n        link: 'https://www.nowcoder.com/interview/',\n        description: '牛客网面试经验',\n        item: items,\n    };","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/nowcoder/interview.ts#L26-L62","documentation":"Thrown when the Nowcoder job-experience API returns a non-zero `code` after a POST request to `gw-c.nowcoder.com/api/sparta/job-experience/experience/job/list`. The payload includes `jobId`, `level: 3`, `order: 3`, `page: 1`. This is an upstream API business error, not a local validation failure.","triggerScenarios":"Requesting the nowcoder interview route with a `jobId` that the upstream API rejects, or when the API is temporarily unavailable. The jobId might not correspond to any active job listing.","commonSituations":"The jobId is stale or has been removed from Nowcoder. The API endpoint was restructured. Anti-crawler protection returns a structured error response. The gateway is under maintenance.","solutions":["Verify the `jobId` exists on nowcoder.com by browsing the interview experience page directly.","Retry after a few minutes for transient failures.","Inspect the raw API response by POSTing to the endpoint manually with the same payload.","If the API moved, update the URL on line 36 of `lib/routes/nowcoder/interview.ts`."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    const responseBody = (await got.post(link, { json: payload })).data;\n    if (responseBody.code !== 0) {\n        throw new Error(`接口错误，错误代码:${responseBody.code},错误原因:${responseBody.msg}`);\n    }\n} catch (e) {\n    logger.error(`Nowcoder interview API failed for jobId=${jobId}: ${e}`);\n    throw e;\n}","preventionTips":["Verify jobId exists on the nowcoder interview page before subscribing.","Cache interview results to reduce upstream calls.","Log the full upstream error for debugging."],"tags":["api-error","nowcoder","upstream","chinese-site"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}