PM-7698 Fix crash because the catch logic was wrong and it was allowing certain exception to bubble up and explode, so move the if internally. (#3208)

This commit is contained in:
Federico Maccaroni 2024-05-01 10:52:52 -03:00 committed by GitHub
parent 2023fe6644
commit 98621341a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -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);
}
}
}
}