Skip to content

Commit

Permalink
fix: the second page per website to analyze had url wrong + add verif…
Browse files Browse the repository at this point in the history
…ication of successful status code
  • Loading branch information
sneko committed Feb 24, 2024
1 parent 3f2a120 commit 4a7983b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/features/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ export async function updateWebsiteDataOnDomains() {

let anotherPageData: getWebsiteDataResponse;
try {
anotherPageData = await getWebsiteData(browser, url.toString(), 5000);
anotherPageData = await getWebsiteData(browser, anotherPageUrl.toString(), 5000);
} catch (error) {
if (error instanceof Error) {
handleReachabilityError(error);
Expand All @@ -615,7 +615,9 @@ export async function updateWebsiteDataOnDomains() {
}
}

anotherPageTitle = anotherPageData.title;
if (anotherPageData.status >= 200 && anotherPageData.status < 300) {
anotherPageTitle = anotherPageData.title;
}

break;
}
Expand Down

0 comments on commit 4a7983b

Please sign in to comment.