mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
8 lines
225 B
TypeScript
8 lines
225 B
TypeScript
export function shouldRetryHandler(failureCount: number, error: Error) {
|
|
return failureCount < 3 && error.message.includes('429');
|
|
}
|
|
|
|
export function getRetryDelay(attempt: number) {
|
|
return 1000 * Math.pow(3, attempt);
|
|
}
|