From 69da82b139d952f09aa5e1b1a51c887223fd20db Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Fri, 12 Sep 2025 17:53:37 +0000 Subject: [PATCH] chore(fetcher): bring back error retry --- src/utils/Fetcher.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/utils/Fetcher.ts b/src/utils/Fetcher.ts index 5c19c11..a181b87 100644 --- a/src/utils/Fetcher.ts +++ b/src/utils/Fetcher.ts @@ -313,6 +313,13 @@ export class Fetcher { } } + if (response.status >= 500 && tryCount < 3) { + this.logger.warn(`Retrying fetch ${init?.method ?? 'GET'} ${url} because of error`, ctx); + await this.sleep(333); + + return await this.fetchWithTimeout(ctx, url, init, ++tryCount); + } + return response; };