From 0dda19607d18547219eb03100407569aa8f4a603 Mon Sep 17 00:00:00 2001 From: ghe Date: Wed, 6 Jul 2022 13:35:56 +0100 Subject: [PATCH] fix: do not retry 404s --- src/lib/request/requestManager.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/request/requestManager.ts b/src/lib/request/requestManager.ts index 7645d6e..64033a4 100644 --- a/src/lib/request/requestManager.ts +++ b/src/lib/request/requestManager.ts @@ -117,7 +117,10 @@ class RequestsManager { requestId, ); const alreadyRetriedCount = this._retryCounter.get(requestId) || 0; - if (alreadyRetriedCount >= this._MAX_RETRY_COUNT) { + if ( + err?.name === 'NotFoundError' || + alreadyRetriedCount >= this._MAX_RETRY_COUNT + ) { this._emit({ eventType: eventType.error, channel: request.channel,