mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +00:00
fix(bot): don't show postgres connection errors to user
This commit is contained in:
parent
620364bf61
commit
2fabdd2bab
1 changed files with 9 additions and 6 deletions
|
|
@ -89,12 +89,15 @@ public static class MiscUtils
|
||||||
if (e is NpgsqlException tpe && tpe.InnerException is TimeoutException)
|
if (e is NpgsqlException tpe && tpe.InnerException is TimeoutException)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Ignore thread pool exhaustion errors
|
if (e is NpgsqlException npe &&
|
||||||
if (e is NpgsqlException npe && npe.Message.Contains("The connection pool has been exhausted"))
|
(
|
||||||
return false;
|
// Ignore thread pool exhaustion errors
|
||||||
|
npe.Message.Contains("The connection pool has been exhausted")
|
||||||
// ignore "Exception while reading from stream"
|
// ignore "Exception while reading from stream"
|
||||||
if (e is NpgsqlException npe2 && npe2.Message.Contains("Exception while reading from stream"))
|
|| npe.Message.Contains("Exception while reading from stream")
|
||||||
|
// ignore "Exception while connecting"
|
||||||
|
|| npe.Message.Contains("Exception while connecting")
|
||||||
|
))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue