Improve quota- and resource-related 429 error handling, also taking Code Assist customer tiers into consideration (#3609)

This commit is contained in:
Bryan Morgan
2025-07-09 10:18:15 -04:00
committed by GitHub
parent 8f2da86aa5
commit b0cce95286
14 changed files with 611 additions and 63 deletions

View File

@@ -357,7 +357,10 @@ describe('retryWithBackoff', () => {
// Should fail with original error when fallback is rejected
expect(result).toBeInstanceOf(Error);
expect(result.message).toBe('Rate limit exceeded');
expect(fallbackCallback).toHaveBeenCalledWith('oauth-personal');
expect(fallbackCallback).toHaveBeenCalledWith(
'oauth-personal',
expect.any(Error),
);
});
it('should handle mixed error types (only count consecutive 429s)', async () => {