Extend HTTP 500 error handling to all 5xx codes

This commit is contained in:
Dragory 2020-12-18 05:25:17 +02:00
parent 1a3d6d2fd9
commit 266e951f40
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -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);