mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
"Properly" handle CloudFlare errors in webhook execution
This commit is contained in:
parent
b927d0c2b7
commit
e7b28261b2
1 changed files with 6 additions and 0 deletions
|
|
@ -81,6 +81,12 @@ namespace PluralKit.Bot
|
|||
{
|
||||
response = await webhook.ExecuteAsync(dwb);
|
||||
}
|
||||
catch (JsonReaderException)
|
||||
{
|
||||
// This happens sometimes when we hit a CloudFlare error (or similar) on Discord's end
|
||||
// Nothing we can do about this - happens sometimes under server load, so just drop the message and give up
|
||||
throw new WebhookExecutionErrorOnDiscordsEnd();
|
||||
}
|
||||
catch (NotFoundException e)
|
||||
{
|
||||
if (e.JsonMessage.Contains("10015") && !hasRetried)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue