From e88486cb410256fa8f094b871fa97808fb4098f2 Mon Sep 17 00:00:00 2001 From: alyssa Date: Fri, 18 Oct 2024 03:34:10 +0900 Subject: [PATCH] chore: update dotnet-bot's idea of what errors are our problem --- Myriad/Gateway/ShardConnection.cs | 3 ++- PluralKit.Bot/Utils/MiscUtils.cs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Myriad/Gateway/ShardConnection.cs b/Myriad/Gateway/ShardConnection.cs index 158762b5..c1fea661 100644 --- a/Myriad/Gateway/ShardConnection.cs +++ b/Myriad/Gateway/ShardConnection.cs @@ -72,7 +72,8 @@ public class ShardConnection: IAsyncDisposable } catch (Exception e) { - _logger.Error(e, "Shard {ShardId}: Error reading from WebSocket"); + // these are never useful + // _logger.Error(e, "Shard {ShardId}: Error reading from WebSocket"); // force close so we can "reset" await CloseInner(WebSocketCloseStatus.NormalClosure, null); } diff --git a/PluralKit.Bot/Utils/MiscUtils.cs b/PluralKit.Bot/Utils/MiscUtils.cs index ed05fd01..bb7a3aa7 100644 --- a/PluralKit.Bot/Utils/MiscUtils.cs +++ b/PluralKit.Bot/Utils/MiscUtils.cs @@ -49,17 +49,17 @@ public static class MiscUtils if (e is WebhookExecutionErrorOnDiscordsEnd) return false; // Socket errors are *not our problem* - if (e.GetBaseException() is SocketException) return false; + // if (e.GetBaseException() is SocketException) return false; // Tasks being cancelled for whatver reason are, you guessed it, also not our problem. - if (e is TaskCanceledException) return false; + // if (e is TaskCanceledException) return false; // Sometimes Discord just times everything out. - if (e is TimeoutException) return false; + // if (e is TimeoutException) return false; if (e is UnknownDiscordRequestException tde && tde.Message == "Request Timeout") return false; // HTTP/2 streams are complicated and break sometimes. - if (e is HttpRequestException) return false; + // if (e is HttpRequestException) return false; // This may expanded at some point. return true;