mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
chore: update dotnet-bot's idea of what errors are our problem
This commit is contained in:
parent
84652d6e3d
commit
e88486cb41
2 changed files with 6 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue