MCPcopy Create free account
hub / github.com/anus-dev/ANUS / isGenericQuotaExceededError

Function isGenericQuotaExceededError

packages/core/src/utils/quotaErrorDetection.ts:87–101  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

85}
86
87export function isGenericQuotaExceededError(error: unknown): boolean {
88 if (typeof error === 'string') {
89 return error.includes('Quota exceeded for quota metric');
90 }
91
92 if (isStructuredError(error)) {
93 return error.message.includes('Quota exceeded for quota metric');
94 }
95
96 if (isApiError(error)) {
97 return error.error.message.includes('Quota exceeded for quota metric');
98 }
99
100 return false;
101}

Callers 3

getRateLimitMessageFunction · 0.85
retryWithBackoffFunction · 0.85
flashFallbackHandlerFunction · 0.85

Calls 2

isApiErrorFunction · 0.85
isStructuredErrorFunction · 0.70

Tested by

no test coverage detected