kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
Merge pull request #139 from waylaidwanderer/fix/remove-unnecessary-console-logging
commit
f2a0e61d9a
|
@ -231,14 +231,12 @@ async function checkForChatGPTAtCapacity(page: Page) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
res = await page.$('[role="alert"]')
|
res = await page.$('[role="alert"]')
|
||||||
console.log('capacity text', res)
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// ignore errors likely due to navigation
|
// ignore errors likely due to navigation
|
||||||
console.warn(err.toString())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
const error = new types.ChatGPTError('ChatGPT is at capacity')
|
const error = new types.ChatGPTError(`ChatGPT is at capacity: ${res}`)
|
||||||
error.statusCode = 503
|
error.statusCode = 503
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue