From b83d8282a2cab614940702efff81e300be725573 Mon Sep 17 00:00:00 2001 From: lakhoune Date: Sun, 10 Dec 2023 20:56:36 +0100 Subject: [PATCH] integrates check necessary because api returns 200 --- src/lib/isErrorResponse.js | 6 ++++++ src/statistics/bot-statistics.js | 29 +++++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 src/lib/isErrorResponse.js diff --git a/src/lib/isErrorResponse.js b/src/lib/isErrorResponse.js new file mode 100644 index 0000000..e71ca6c --- /dev/null +++ b/src/lib/isErrorResponse.js @@ -0,0 +1,6 @@ +export function isErrorResponse(responseText) { + if (typeof responseText === "string") { + return !responseText.includes("