Throw Exponential Backoff error containing all execution errors

This commit is contained in:
2026-07-11 12:54:14 +00:00
parent 869b025e08
commit 06cc8eff25
3 changed files with 37 additions and 20 deletions

View File

@@ -2,8 +2,8 @@
* 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');
constructor(errors: Array<Error>) {
super('Exponential backoff: Max retries hit', { cause: errors });
this.name = 'ExponentialBackoffMaxRetriesHitError';
}
}