From 792acad50afeaa7cb702b210c4fcd3c799d2ac04 Mon Sep 17 00:00:00 2001 From: Ske Date: Tue, 12 May 2020 22:19:49 +0200 Subject: [PATCH] Don't try to parse webhook error if error isn't JSON --- PluralKit.Bot/Services/WebhookExecutorService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.Bot/Services/WebhookExecutorService.cs b/PluralKit.Bot/Services/WebhookExecutorService.cs index 90ea2c68..bc27dd6d 100644 --- a/PluralKit.Bot/Services/WebhookExecutorService.cs +++ b/PluralKit.Bot/Services/WebhookExecutorService.cs @@ -89,7 +89,7 @@ namespace PluralKit.Bot } catch (NotFoundException e) { - if (e.JsonMessage.Contains("10015") && !hasRetried) + if (e.JsonMessage != null && e.JsonMessage.Contains("10015") && !hasRetried) { // Error 10015 = "Unknown Webhook" - this likely means the webhook was deleted // but is still in our cache. Invalidate, refresh, try again