{"record":{"id":"4c7cb5c4efceaa49","repo":"jackwener/OpenCLI","slug":"no-data-4c7cb5","errorCode":"NO_DATA","errorMessage":"Company ${encCoId} not found","messagePattern":"Company (.+?) not found","errorType":"error_code","errorClass":"CliError","httpStatus":null,"severity":"warning","filePath":"clis/51job/company.js","lineNumber":82,"sourceCode":"                    };\n                });\n            // Company meta is three inline spans under .c-info.ellipsis\n            // (title/size/industry) — extract them by position.\n            const cInfo = document.querySelector('.c-info.ellipsis');\n            const cInfoParts = cInfo\n                ? [...cInfo.querySelectorAll('span')].map(s => (s.innerText || '').trim()).filter(Boolean)\n                : [];\n            return {\n                companyName,\n                companyIntro,\n                links,\n                cInfoParts,\n                sidebarText: sidebarText.slice(0, 400),\n            };\n        })()`;\n        const data = await page.evaluate(script);\n        if (data.error === 'NOT_FOUND') {\n            throw new CliError('NO_DATA', `Company ${encCoId} not found`);\n        }\n        if (!data.companyName) {\n            throw new CliError('NO_DATA', `Could not parse company page ${encCoId}; layout may have changed`);\n        }\n\n        const companyUrl = url;\n        const [companyType = '', companySize = '', companyIndustry = ''] = data.cInfoParts || [];\n\n        const seen = new Set();\n        const rows = [];\n        for (const link of data.links || []) {\n            const job = parseCompanyJobCard(link);\n            if (!job) continue;\n            if (seen.has(job.jobId)) continue;\n            seen.add(job.jobId);\n            rows.push({\n                rank: rows.length + 1,\n                ...job,","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/51job/company.js#L64-L100","documentation":"The 51job company detail CLI fetched the company page in a headless browser, and the in-page script detected the company does not exist (it set data.error='NOT_FOUND'), so the library throws CliError('NO_DATA'). This is a per-page data availability error: the requested encCoId does not resolve to a live company profile on 51job. It is thrown before any parsing is attempted.","triggerScenarios":"Calling the company subcommand with an encCoId that does not exist on 51job (deleted company, typo in the encoded id, or an id scraped from a stale listing). The in-page script checks for the site's not-found state and returns error='NOT_FOUND', hitting the throw at clis/51job/company.js:82.","commonSituations":"Re-using company ids cached from an old crawl; ids taken from job postings whose company has since been removed; passing a numeric company id instead of the encoded encCoId the site uses in URLs; site A/B tests moving the not-found marker so the page yields NOT_FOUND incorrectly.","solutions":["Verify the encCoId by opening the company URL in a browser; if 404, the id is invalid — obtain a fresh id from a current job listing","Re-scrape or refresh your source listing to get a live encCoId","Confirm you are passing the encoded id exactly as it appears in the 51job company URL, not a raw numeric id","Retry later in case of a transient site-side outage masquerading as not-found"],"exampleFix":"// before\nawait cli.company({ encCoId: cachedId });\n// after\nif (!/^[A-Za-z0-9]+$/.test(cachedId)) throw new Error('bad encCoId');\ntry {\n  const info = await cli.company({ encCoId: cachedId });\n} catch (e) {\n  if (e.code === 'NO_DATA') refreshCompanyCache(cachedId); // drop stale id\n}","handlingStrategy":"try-catch","validationCode":"if (!encCoId || typeof encCoId !== 'string') throw new Error('valid encCoId required');","typeGuard":"const isEncCoId = (v) => typeof v === 'string' && /^[A-Za-z0-9_-]+$/.test(v);","tryCatchPattern":"try {\n  const info = await cli.company({ encCoId });\n} catch (e) {\n  if (e.code === 'NO_DATA') return null; // company does not exist\n  throw e;\n}","preventionTips":["Refresh company ids from live listings instead of long-lived caches","Validate encCoId format before calling","Keep a local blacklist of known-dead ids","Log the failing id so it can be re-verified manually"],"tags":["scraping","no-data","page-not-found"],"backgroundTag":"scraped-page-not-found","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}