mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Merge "Login with Google Workspace" auth option into "Login with Google" (#1574)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
This commit is contained in:
committed by
GitHub
parent
00b24c917e
commit
79c647d486
@@ -29,12 +29,12 @@ describe('parseAndFormatApiError', () => {
|
||||
expect(result).toContain('Your request has been rate limited');
|
||||
});
|
||||
|
||||
it('should format a 429 API error with the enterprise message', () => {
|
||||
it('should format a 429 API error with the personal message', () => {
|
||||
const errorMessage =
|
||||
'got status: 429 Too Many Requests. {"error":{"code":429,"message":"Rate limit exceeded","status":"RESOURCE_EXHAUSTED"}}';
|
||||
const result = parseAndFormatApiError(
|
||||
errorMessage,
|
||||
AuthType.LOGIN_WITH_GOOGLE_ENTERPRISE,
|
||||
AuthType.LOGIN_WITH_GOOGLE_PERSONAL,
|
||||
);
|
||||
expect(result).toContain('[API Error: Rate limit exceeded');
|
||||
expect(result).toContain(enterpriseMessage);
|
||||
|
||||
@@ -46,7 +46,6 @@ function isStructuredError(error: unknown): error is StructuredError {
|
||||
function getRateLimitMessage(authType?: AuthType): string {
|
||||
switch (authType) {
|
||||
case AuthType.LOGIN_WITH_GOOGLE_PERSONAL:
|
||||
case AuthType.LOGIN_WITH_GOOGLE_ENTERPRISE:
|
||||
return RATE_LIMIT_ERROR_MESSAGE_GOOGLE;
|
||||
case AuthType.USE_GEMINI:
|
||||
return RATE_LIMIT_ERROR_MESSAGE_USE_GEMINI;
|
||||
|
||||
Reference in New Issue
Block a user