From 980c60469cd0e0eb5e307178ab4e045521f4ebe8 Mon Sep 17 00:00:00 2001 From: rladenson Date: Tue, 31 Dec 2024 05:37:57 -0700 Subject: [PATCH] feat: user-readable error for TaskCanceledException --- PluralKit.Bot/CommandSystem/Context/Context.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PluralKit.Bot/CommandSystem/Context/Context.cs b/PluralKit.Bot/CommandSystem/Context/Context.cs index 17f5af15..8fe82cfd 100644 --- a/PluralKit.Bot/CommandSystem/Context/Context.cs +++ b/PluralKit.Bot/CommandSystem/Context/Context.cs @@ -138,6 +138,11 @@ public class Context // Got a complaint the old error was a bit too patronizing. Hopefully this is better? await Reply($"{Emojis.Error} Operation timed out, sorry. Try again, perhaps?"); } + catch (TaskCanceledException) + { + // HTTP timeouts... + await Reply($"{Emojis.Error} Operation timed out, please try again later."); + } } ///