Skip to content

Commit

Permalink
fix: do not retry 404s
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Jul 6, 2022
1 parent 6f5fff3 commit 0dda196
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/request/requestManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0dda196

Please sign in to comment.