handle proxy error

This commit is contained in:
2023-04-22 10:22:26 +02:00
parent 5800c59948
commit d46d424c28
+8
View File
@@ -384,6 +384,14 @@ class CommandorPage {
await this.page.reload() await this.page.reload()
} else if (currentPage.url().includes("sorry")) { } else if (currentPage.url().includes("sorry")) {
await this.resetBrowser() await this.resetBrowser()
} else if (content.includes("PROXY_CONNECTION_FAILED")) {
logWithDevice("PROXY_CONNECTION_FAILED, will reload page", this.device);
await delay(2000)
await this.page.reload()
} else if (content.includes("ERR_NETWORK_CHANGED")) {
logWithDevice("ERR_NETWORK_CHANGED, will reload page", this.device);
await delay(2000)
await this.page.reload()
} else { } else {
if (currentPage.url() === RDV_URL) { if (currentPage.url() === RDV_URL) {
await this.fillFields(this.page); await this.fillFields(this.page);