diff --git a/src/Core/Utilities/TaskExtensions.cs b/src/Core/Utilities/TaskExtensions.cs index 3627a2ae4..93f1fe0f3 100644 --- a/src/Core/Utilities/TaskExtensions.cs +++ b/src/Core/Utilities/TaskExtensions.cs @@ -37,9 +37,12 @@ namespace Bit.Core.Utilities { await task.ConfigureAwait(false); } - catch (Exception ex) when (shouldLogException(ex)) + catch (Exception ex) { - LoggerHelper.LogEvenIfCantBeResolved(ex); + if (shouldLogException(ex)) + { + LoggerHelper.LogEvenIfCantBeResolved(ex); + } } } }