fix: audit bugs + better error logging for searcher debugging
Bugs fixed: - form_filler.mjs: add missing await on el.evaluate() in getLabel() - analyze_ats.mjs: check job.apply_type instead of non-existent job.easy_apply - status.mjs: fix typo "that run" → "in that run" - README: add missing lock.mjs to project structure Logging improvements: - job_searcher.mjs: log browser creation, login steps, stack traces on error - linkedin.mjs/wellfound.mjs: catch and log navigation failures per keyword - browser.mjs: descriptive errors for Kernel and CDP connection failures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,9 +38,19 @@ export async function createBrowser(settings, profileKey) {
|
||||
if (profileName) opts.profile = { name: profileName };
|
||||
if (kernelConfig.proxy_id) opts.proxy = { id: kernelConfig.proxy_id };
|
||||
|
||||
const kb = await kernel.browsers.create(opts);
|
||||
let kb;
|
||||
try {
|
||||
kb = await kernel.browsers.create(opts);
|
||||
} catch (e) {
|
||||
throw new Error(`Kernel browser creation failed: ${e.message}`);
|
||||
}
|
||||
const pw = await getChromium(playwrightPath);
|
||||
const browser = await pw.connectOverCDP(kb.cdp_ws_url);
|
||||
let browser;
|
||||
try {
|
||||
browser = await pw.connectOverCDP(kb.cdp_ws_url);
|
||||
} catch (e) {
|
||||
throw new Error(`CDP connection failed (browser ${kb.id}): ${e.message}`);
|
||||
}
|
||||
const ctx = browser.contexts()[0] || await browser.newContext();
|
||||
const page = ctx.pages()[0] || await ctx.newPage();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user