chore: update dotnet-bot's idea of what errors are our problem

This commit is contained in:
alyssa 2024-10-18 03:34:10 +09:00
parent 84652d6e3d
commit e88486cb41
2 changed files with 6 additions and 5 deletions

View file

@ -72,7 +72,8 @@ public class ShardConnection: IAsyncDisposable
} }
catch (Exception e) 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" // force close so we can "reset"
await CloseInner(WebSocketCloseStatus.NormalClosure, null); await CloseInner(WebSocketCloseStatus.NormalClosure, null);
} }

View file

@ -49,17 +49,17 @@ public static class MiscUtils
if (e is WebhookExecutionErrorOnDiscordsEnd) return false; if (e is WebhookExecutionErrorOnDiscordsEnd) return false;
// Socket errors are *not our problem* // 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. // 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. // 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; if (e is UnknownDiscordRequestException tde && tde.Message == "Request Timeout") return false;
// HTTP/2 streams are complicated and break sometimes. // 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. // This may expanded at some point.
return true; return true;