From 499511f79dc81c15516cdda63cfa690815e1a765 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Thu, 19 Aug 2021 00:01:29 +0300 Subject: [PATCH] Fix 429 string check --- backend/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 128c82f7..fdd7986c 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -189,7 +189,7 @@ connect().then(async () => { const safe429MaxCount = 5; const safe429Counter = new DecayingCounter(safe429DecayInterval); client.on(Constants.Events.DEBUG, errorText => { - if (!errorText.indexOf("429")) { + if (!errorText.includes("429")) { // tslint:disable-next-line:no-console console.debug(`[DEBUG] ${errorText}`); return;