From f23bdf24802a1e6a7f3eebeebb2f51a7b98aee15 Mon Sep 17 00:00:00 2001 From: Glazelf <35176230+Glazelf@users.noreply.github.com> Date: Wed, 15 May 2024 19:10:26 +0200 Subject: [PATCH] Ignore more connection errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simultaneous button spam on Who's That Pokémon minigame can cause ECONNRESET socket hang up error --- util/logger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/logger.js b/util/logger.js index e4db2bd96..a77ef6358 100644 --- a/util/logger.js +++ b/util/logger.js @@ -16,8 +16,8 @@ module.exports = async (exception, client, interaction = null) => { return sendMessage({ client: client, interaction: interaction, content: "An internal server error occurred at Discord. Please check back later to see if Discord has fixed the issue.", ephemeral: true }); } else if (exceptionString.includes("Unknown interaction")) { return; // Expired interaction, can't reply to said interaction - } else if (exceptionString.includes("connect ETIMEDOUT") || exceptionString.includes("connect ECONNREFUSED")) { - return; + } else if (exceptionString.includes("ETIMEDOUT") || exceptionString.includes("ECONNREFUSED") || exceptionString.includes("ECONNRESET")) { + return; // Connection/network errors, not a bot issue for the most part. Might be Discord rate limits involved, especially with ECONNRESET socket hang up errors } else if (exceptionString.includes("AxiosError")) { return console.log(`${timestamp}: Axios error occurred (likely remote server connection or bad gateway)`); } else if (!exceptionString.includes("Missing Permissions")) {