Commit dd872320 authored by Travis Fischer's avatar Travis Fischer

feat: trying to fix capacity testing

parent ae9eedc1
...@@ -229,13 +229,14 @@ async function checkForChatGPTAtCapacity(page: Page) { ...@@ -229,13 +229,14 @@ async function checkForChatGPTAtCapacity(page: Page) {
let res: ElementHandle<Node>[] let res: ElementHandle<Node>[]
try { try {
// res = await page.$('[role="alert"]')
res = await page.$x("//div[contains(., 'ChatGPT is at capacity')]") res = await page.$x("//div[contains(., 'ChatGPT is at capacity')]")
} catch (err) { } catch (err) {
// ignore errors likely due to navigation // ignore errors likely due to navigation
} }
if (res?.length) { if (res?.length) {
const error = new types.ChatGPTError(`ChatGPT is at capacity: ${res}`) const error = new types.ChatGPTError('ChatGPT is at capacity')
error.statusCode = 503 error.statusCode = 503
throw error 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