-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: 1.5
-
Component/s: None
-
Minor Change
When server instance gets disconnected and state verification have not yet kicked in, MongoServerInstance.AcquireConnection throws InvalidOperationException("Server instance XXX is no longer connected."). While this is an internal state problem (so IOE fits the scheme), I think it should be treated as a transient connection error and instead throw a MongoConnectionException (with the same message). For us, the exception types are really important, because we've built an auto-retry mechanism around driver calls, and catching something as ambiguous as InvalidOperationException makes robust error handling hard enough.
- is related to
-
CSHARP-474 Review all exceptions thrown by the C# driver
- Closed