refactor: simplify daily quota error messages (#12386)

This commit is contained in:
Gaurav
2025-10-31 10:49:32 -07:00
committed by GitHub
parent f4ee245bf9
commit 31c5761e06

View File

@@ -96,7 +96,7 @@ export function classifyGoogleError(error: unknown): unknown {
const quotaId = violation.quotaId ?? '';
if (quotaId.includes('PerDay') || quotaId.includes('Daily')) {
return new TerminalQuotaError(
`${googleApiError.message}\nExpected quota reset within 24h.`,
`You have exhausted your daily quota on this model.`,
googleApiError,
);
}
@@ -139,7 +139,7 @@ export function classifyGoogleError(error: unknown): unknown {
const quotaLimit = errorInfo.metadata?.['quota_limit'] ?? '';
if (quotaLimit.includes('PerDay') || quotaLimit.includes('Daily')) {
return new TerminalQuotaError(
`${googleApiError.message}\nExpected quota reset within 24h.`,
`You have exhausted your daily quota on this model.`,
googleApiError,
);
}