Commit 5170641e authored by Joel's avatar Joel Committed by GitHub

fix: remove unnecessary console logging

Removes unnecessary console logging in `checkForChatGPTAtCapacity()` and puts the alert message into the error message.
parent d598482f
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment