diff options
Diffstat (limited to 'packages/core/src/utils/quotaErrorDetection.ts')
| -rw-r--r-- | packages/core/src/utils/quotaErrorDetection.ts | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/packages/core/src/utils/quotaErrorDetection.ts b/packages/core/src/utils/quotaErrorDetection.ts index a8e87a5d..b07309cd 100644 --- a/packages/core/src/utils/quotaErrorDetection.ts +++ b/packages/core/src/utils/quotaErrorDetection.ts @@ -44,20 +44,9 @@ export function isProQuotaExceededError(error: unknown): boolean { // - "Quota exceeded for quota metric 'Gemini 2.5-preview Pro Requests'" // We use string methods instead of regex to avoid ReDoS vulnerabilities - const checkMessage = (message: string): boolean => { - console.log('[DEBUG] isProQuotaExceededError checking message:', message); - const result = - message.includes("Quota exceeded for quota metric 'Gemini") && - message.includes("Pro Requests'"); - console.log('[DEBUG] isProQuotaExceededError result:', result); - return result; - }; - - // Log the full error object to understand its structure - console.log( - '[DEBUG] isProQuotaExceededError - full error object:', - JSON.stringify(error, null, 2), - ); + const checkMessage = (message: string): boolean => + message.includes("Quota exceeded for quota metric 'Gemini") && + message.includes("Pro Requests'"); if (typeof error === 'string') { return checkMessage(error); |
