feat: Centralize browser instance creation to eliminate duplication in Desktop and Mobile flows

fix: Update error message for HTTP 400 checks to English
refactor: Improve logging for network idle wait timeout in Workers
fix: Initialize lastError in Axios client to prevent undefined errors
chore: Update tsconfig to include path mappings for better module resolution
This commit is contained in:
2025-11-09 17:56:46 +01:00
parent 56aacd3667
commit 9fb5911fa2
10 changed files with 101 additions and 38 deletions

View File

@@ -101,7 +101,7 @@ export class Workers {
await page.goto(punchCard.parentPromotion.destinationUrl, { referer: this.bot.config.baseURL })
// Wait for new page to load, max 10 seconds, however try regardless in case of error
await page.waitForLoadState('networkidle', { timeout: 5000 }).catch(() => { })
await page.waitForLoadState('networkidle', { timeout: 5000 }).catch(logError('PUNCH-CARD', 'Network idle wait timeout (non-critical)', this.bot.isMobile))
await this.solveActivities(page, activitiesUncompleted, punchCard)