{"record":{"id":"1f25774e74ff7b4a","repo":"jackwener/OpenCLI","slug":"no-data-1f2577","errorCode":"NO_DATA","errorMessage":"No recommended jobs returned","messagePattern":"No recommended jobs returned","errorType":"error_code","errorClass":"CliError","httpStatus":null,"severity":"warning","filePath":"clis/51job/hot.js","lineNumber":53,"sourceCode":"        const pageNum = Math.max(1, Number(kwargs.page) || 1);\n        const jobArea = resolveCity(kwargs.area);\n        const sortType = resolveCode(kwargs.sort, SORT_CODES, '0');\n\n        const currentUrl = await page.evaluate(`(() => window.location.href)()`);\n        if (!String(currentUrl).startsWith(WE_ORIGIN)) {\n            await navigateTo(page, `${WE_ORIGIN}/pc/search?searchType=2`, 2);\n        }\n\n        const url = buildSearchUrl({\n            keyword: '', jobArea, sortType,\n            pageNum, pageSize: Math.min(limit, 50),\n        });\n        const data = await pageFetchJson(page, url);\n        if (data.status !== '1' && data.status !== 1) {\n            throw new CliError('API_ERROR', `51job hot failed: ${data.message ?? 'unknown'}`);\n        }\n        const items = data?.resultbody?.job?.items ?? [];\n        if (items.length === 0) throw new CliError('NO_DATA', 'No recommended jobs returned');\n        return items.slice(0, limit).map((it, i) => mapJobItem(it, (pageNum - 1) * limit + i + 1));\n    },\n});\n","sourceCodeStart":35,"sourceCodeEnd":57,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/51job/hot.js#L35-L57","documentation":"The hot-jobs API call succeeded (status '1') but the response contained zero items in resultbody.job.items, so the library throws CliError('NO_DATA'). The API worked; it simply returned no recommended jobs for the given filters.","triggerScenarios":"Calling the hot subcommand with filters (jobArea, sortType, page) that match no jobs — e.g. an obscure city code, a page number beyond the last page, or a sortType with no results — thrown at clis/51job/hot.js:53.","commonSituations":"Paging past the end of the result set during batch crawls; filtering to a small/remote city with no recommendations; API returning empty during low-traffic periods or for unauthenticated/flagged sessions.","solutions":["Retry at page 1 without restrictive filters to confirm data exists","Check the jobArea code is a real 51job city code","Stop pagination when this error appears — it signals the end of results","Retry later; the recommendation feed can be transiently empty"],"exampleFix":"// before\nconst jobs = await cli.hot({ page: deepPage });\n// after\ntry {\n  return await cli.hot({ page: deepPage });\n} catch (e) {\n  if (e.code === 'NO_DATA') return []; // end of results\n  throw e;\n}","handlingStrategy":"fallback","validationCode":"if (!Number.isInteger(page) || page < 1) throw new Error('page must be a positive integer');","typeGuard":"const hasItems = (d) => Array.isArray(d?.resultbody?.job?.items) && d.resultbody.job.items.length > 0;","tryCatchPattern":"try {\n  return await cli.hot({ jobArea, page });\n} catch (e) {\n  if (e.code === 'NO_DATA') return []; // empty page — end of results\n  throw e;\n}","preventionTips":["Stop paginating as soon as this error is thrown","Avoid over-restrictive area/sortType combinations","Fall back to page 1 or a broader area when a filtered call is empty","Handle transient empty feeds by retrying later"],"tags":["no-data","empty-result","pagination"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}