From ae95a0d43667d6bb19317891b4fe3d5a3d409430 Mon Sep 17 00:00:00 2001 From: Evorp <3vorpgaming@gmail.com> Date: Mon, 12 Feb 2024 18:10:07 -0800 Subject: [PATCH] fix broken axios stack traces --- src/helpers/functions/errorHandler.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/helpers/functions/errorHandler.ts b/src/helpers/functions/errorHandler.ts index 99b65287..42b84e54 100644 --- a/src/helpers/functions/errorHandler.ts +++ b/src/helpers/functions/errorHandler.ts @@ -86,12 +86,7 @@ export async function errorHandler(client: Client, error: any, type: string) { let description = error.stack; let codeBlocks = ""; - if (error.isAxiosError) { - // axios errors are JSON - description = JSON.stringify(error.toJSON()); - eprotoError = error.code === "EPROTO"; - codeBlocks = "json"; - } else if (!description) { + if (!description) { // no stack trace so it's JSON description = JSON.stringify(error); codeBlocks = "json";