diff --git a/src/poe-client.js b/src/poe-client.js index 23080a70a..5b3f038f3 100644 --- a/src/poe-client.js +++ b/src/poe-client.js @@ -268,6 +268,7 @@ function generate_payload(query, variables) { async function request_with_retries(method, attempts = 10) { const url = ''; for (let i = 0; i < attempts; i++) { + //console.log(method) try { const response = await method(); if (response.status === 200) { @@ -276,8 +277,12 @@ async function request_with_retries(method, attempts = 10) { logger.warn(`Server returned a status code of ${response.status} while downloading ${url}. Retrying (${i + 1}/${attempts})...`); } catch (err) { - console.log(err); + console.log(`-------------------ERROR-------------------`) + //console.log(logObjectStructure(err, 0, 2)); + console.log(`Retries: ${i}`) + //console.log(`-------------------------------------------`) } + await delay(100) } throw new Error(`Failed to download ${url} too many times.`); } @@ -396,7 +401,7 @@ class Client { const viewerKeyName = 'viewer' const botNameKeyName = 'chatOfBotHandle' const defaultBotKeyName = 'defaultBotNickname' - + //console.log('this.session.get(this.home_url)') const r = await request_with_retries(() => this.session.get(this.home_url)); const jsonRegex = /