feat: user-readable error for TaskCanceledException

This commit is contained in:
rladenson 2024-12-31 05:37:57 -07:00 committed by Petal Ladenson
parent 7608ec02fd
commit 1d50022d6d

View file

@ -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.");
}
}
/// <summary>