mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat: ignore database timing out
This commit is contained in:
parent
b4e8dda9dd
commit
e5c74edd85
1 changed files with 4 additions and 0 deletions
|
|
@ -62,6 +62,10 @@ namespace PluralKit.Bot
|
|||
// Ignore "Database is shutting down" error
|
||||
if (e is PostgresException pe && pe.SqlState == "57P03") return false;
|
||||
|
||||
// Ignore database timing out as well.
|
||||
if (e is NpgsqlException tpe && tpe.InnerException is TimeoutException)
|
||||
return false;
|
||||
|
||||
// Ignore thread pool exhaustion errors
|
||||
if (e is NpgsqlException npe && npe.Message.Contains("The connection pool has been exhausted")) return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue