mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 22:55:13 +00:00
feat(core): Add content-based retries for JSON generation (#9264)
This commit is contained in:
@@ -137,10 +137,11 @@ describe('retryWithBackoff', () => {
|
||||
const mockFn = vi.fn(async () => {
|
||||
throw new NonRetryableError('Non-retryable error');
|
||||
});
|
||||
const shouldRetry = (error: Error) => !(error instanceof NonRetryableError);
|
||||
const shouldRetryOnError = (error: Error) =>
|
||||
!(error instanceof NonRetryableError);
|
||||
|
||||
const promise = retryWithBackoff(mockFn, {
|
||||
shouldRetry,
|
||||
shouldRetryOnError,
|
||||
initialDelayMs: 10,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user