(error: unknown)
| 85 | } |
| 86 | |
| 87 | export 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 | } |
no test coverage detected