mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 08:23:35 +03:00
fix: don't log stack traces for cancelled operations/tasks
This commit is contained in:
parent
d6d2660fb0
commit
17adfe0628
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ public static class LoggerExtensions
|
|||
|
||||
if (result.Error is ExceptionError exe)
|
||||
{
|
||||
if (exe.Exception is TaskCanceledException)
|
||||
if (exe.Exception is OperationCanceledException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public static class ResultExtensions
|
|||
|
||||
private static void LogResultStackTrace(Result result)
|
||||
{
|
||||
if (result.IsSuccess)
|
||||
if (result.IsSuccess || result.Error is ExceptionError { Exception: OperationCanceledException })
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue