if (exception is InvalidOperationException { Message: "The connection is closed." or "Invalid operation. The connection is closed." })
return true;
if (exception is SqlException
{
Errors:
[
{
Class: 20,
Number: 0,
Message: "A transport-level error has occurred when receiving results from the server. " +
"(provider: TCP Provider, error: 2 - Connection was terminated: Connection was terminated)"
}
]
})
return true;
return false;
I see the issue both in SonarQube (v. 9.6.1) and in SonarLint. I have tests that hits all branches of the code.