From 266e951f40971e3f0853ee7bbbf14eb2f86ae438 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Fri, 18 Dec 2020 05:25:17 +0200 Subject: [PATCH] Extend HTTP 500 error handling to all 5xx codes --- 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 b96a810f..6199948f 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -90,7 +90,7 @@ function errorHandler(err) { } } - if (err instanceof DiscordHTTPError && err.code === 500) { + if (err instanceof DiscordHTTPError && err.code >= 500) { // Don't need stack traces on HTTP 500 errors // These also shouldn't count towards RECENT_DISCORD_ERROR_EXIT_THRESHOLD because they don't indicate an error in our code console.error(err.message);