Upgrade exception filter
This commit is contained in:
parent
3196f60093
commit
cddecb7558
@ -12,6 +12,8 @@ using Npgsql;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
using Polly.Timeout;
|
||||
|
||||
namespace PluralKit.Bot
|
||||
{
|
||||
public static class MiscUtils {
|
||||
@ -68,6 +70,11 @@ namespace PluralKit.Bot
|
||||
if (e is NotFoundException ne && ne.ResponseBody.Contains("<center>nginx</center>")) return false;
|
||||
if (e is UnauthorizedException ue && ue.ResponseBody.Contains("<center>nginx</center>")) return false;
|
||||
|
||||
// Filter out timeout/ratelimit related stuff
|
||||
if (e is TooManyRequestsException) return false;
|
||||
if (e is RatelimitBucketExhaustedException) return false;
|
||||
if (e is TimeoutRejectedException) return false;
|
||||
|
||||
// 5xxs? also not our problem :^)
|
||||
if (e is UnknownDiscordRequestException udre && (int) udre.StatusCode >= 500) return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user