From b914026d8b9be9a073386e06a5d9b2b406f2d6ca Mon Sep 17 00:00:00 2001 From: DaKheera47 Date: Thu, 8 Jan 2026 23:54:06 +0000 Subject: [PATCH] file saved as name --- extractors/ukvisajobs/src/main.ts | 15 ++++++------ .../src/client/components/JobCard.tsx | 2 +- .../src/client/components/JobTable.tsx | 2 +- .../src/client/pages/OrchestratorPage.tsx | 7 +++++- orchestrator/src/server/services/scorer.ts | 24 ++++++++++++++++--- 5 files changed, 37 insertions(+), 13 deletions(-) diff --git a/extractors/ukvisajobs/src/main.ts b/extractors/ukvisajobs/src/main.ts index d5de320..2f392ea 100644 --- a/extractors/ukvisajobs/src/main.ts +++ b/extractors/ukvisajobs/src/main.ts @@ -419,17 +419,18 @@ async function main(): Promise { try { response = await fetchPage(pageNo, authSession, { searchKeyword }); } catch (error) { - if (error instanceof UkVisaJobsAuthError) { - if (!credentials) { + if (!credentials) { + if (error instanceof UkVisaJobsAuthError) { throw new Error('UKVisaJobs auth expired. Set UKVISAJOBS_EMAIL and UKVISAJOBS_PASSWORD to refresh.'); } - console.log(' Auth expired. Refreshing tokens...'); - authSession = await loginWithBrowser(credentials.email, credentials.password); - await saveCachedAuthSession(authSession); - response = await fetchPage(pageNo, authSession, { searchKeyword }); - } else { throw error; } + + const reason = error instanceof UkVisaJobsAuthError ? 'Auth expired.' : 'Fetch failed.'; + console.log(` ${reason} Refreshing tokens and retrying...`); + authSession = await loginWithBrowser(credentials.email, credentials.password); + await saveCachedAuthSession(authSession); + response = await fetchPage(pageNo, authSession, { searchKeyword }); } if (response.status !== 1) { diff --git a/orchestrator/src/client/components/JobCard.tsx b/orchestrator/src/client/components/JobCard.tsx index d9bb8a9..819b2be 100644 --- a/orchestrator/src/client/components/JobCard.tsx +++ b/orchestrator/src/client/components/JobCard.tsx @@ -207,7 +207,7 @@ export const JobCard: React.FC = ({