Add exponential backoff utility

This commit is contained in:
2026-06-29 07:18:20 +00:00
parent 7ce25d6502
commit 6fe4a64562
4 changed files with 512 additions and 0 deletions

9
source/errors.ts Normal file
View File

@@ -0,0 +1,9 @@
/**
* Error thrown when the maximum number of retries is hit in an exponential backoff
*/
export class ExponentialBackoffMaxRetriesHitError extends Error {
constructor() {
super('Exponential backoff: Max retries hit');
this.name = 'ExponentialBackoffMaxRetriesHitError';
}
}