From 5a62c9f83f460649ca1abe67b819623c7882aab0 Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 14 Dec 2022 13:17:21 -0800 Subject: [PATCH] fix: remove unnecessary console logging Removes unnecessary console logging in `checkForChatGPTAtCapacity()` and puts the alert message into the error message. --- legacy/src/openai-auth.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/legacy/src/openai-auth.ts b/legacy/src/openai-auth.ts index 476c6119..7f98e49e 100644 --- a/legacy/src/openai-auth.ts +++ b/legacy/src/openai-auth.ts @@ -231,14 +231,12 @@ async function checkForChatGPTAtCapacity(page: Page) { try { res = await page.$('[role="alert"]') - console.log('capacity text', res) } catch (err) { // ignore errors likely due to navigation - console.warn(err.toString()) } if (res) { - const error = new types.ChatGPTError('ChatGPT is at capacity') + const error = new types.ChatGPTError(`ChatGPT is at capacity: ${res}`) error.statusCode = 503 throw error }