mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-29 07:21:27 -07:00
refactor: simplify daily quota error messages
This commit is contained in:
committed by
Tommaso Sciortino
parent
b1bbef433d
commit
44b3c97486
@@ -96,7 +96,7 @@ export function classifyGoogleError(error: unknown): unknown {
|
|||||||
const quotaId = violation.quotaId ?? '';
|
const quotaId = violation.quotaId ?? '';
|
||||||
if (quotaId.includes('PerDay') || quotaId.includes('Daily')) {
|
if (quotaId.includes('PerDay') || quotaId.includes('Daily')) {
|
||||||
return new TerminalQuotaError(
|
return new TerminalQuotaError(
|
||||||
`${googleApiError.message}\nExpected quota reset within 24h.`,
|
`You have exhausted your daily quota on this model.`,
|
||||||
googleApiError,
|
googleApiError,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ export function classifyGoogleError(error: unknown): unknown {
|
|||||||
const quotaLimit = errorInfo.metadata?.['quota_limit'] ?? '';
|
const quotaLimit = errorInfo.metadata?.['quota_limit'] ?? '';
|
||||||
if (quotaLimit.includes('PerDay') || quotaLimit.includes('Daily')) {
|
if (quotaLimit.includes('PerDay') || quotaLimit.includes('Daily')) {
|
||||||
return new TerminalQuotaError(
|
return new TerminalQuotaError(
|
||||||
`${googleApiError.message}\nExpected quota reset within 24h.`,
|
`You have exhausted your daily quota on this model.`,
|
||||||
googleApiError,
|
googleApiError,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user