1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-29 18:49:53 +03:00

Notify user when a command execution error occurs (#171)

With this PR, whenever command execution fails, the user will get an
error message with details of the error that can be passed on to
developers

An unrelated minor change: errors caused by task cancellations will no
longer be logged

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Signed-off-by: mctaylors <mctaylxrs@outlook.com>
This commit is contained in:
Octol1ttle 2023-10-26 19:54:15 +05:00 committed by GitHub
parent 5b84c8d8d0
commit fb3aebb1e0
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 74 additions and 3 deletions

View file

@ -26,6 +26,11 @@ public static class LoggerExtensions
if (result.Error is ExceptionError exe)
{
if (exe.Exception is TaskCanceledException)
{
return;
}
logger.LogError(exe.Exception, "{ErrorMessage}", message);
return;
}