feat: add HttpRequestException to IsOurProblem

This commit is contained in:
spiral 2021-09-29 21:51:54 -04:00
parent 92e45a07ff
commit f785fa1204
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -1,6 +1,6 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Sockets;
using System.Threading.Tasks;
@ -56,6 +56,9 @@ namespace PluralKit.Bot
// Sometimes Discord just times everything out.
if (e is TimeoutException) return false;
// HTTP/2 streams are complicated and break sometimes.
if (e is HttpRequestException) return false;
// Ignore "Database is shutting down" error
if (e is PostgresException pe && pe.SqlState == "57P03") return false;