-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Error Handling
-
None
Currently the timeout exception message looks like this:
A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = WritableServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "2", ConnectionMode : "Automatic", Type : "ReplicaSet", State : "Connected", Servers : [{ ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/mongodb01:27017" }", EndPoint: "Unspecified/mongodb01:27017", State: "Connected", Type: "ReplicaSetSecondary", WireVersionRange: "[0, 5]" }, ...
It's hard to read for two reasons:
- The ServerId field is redundant to the Endpoint field. The clusterId is going to be the same for all the servers anyway and it's really relevant.
- The Unspecified/ is confusing. It refers to the fact that it's not specified whether to connect with IPV4 or IPV6, but since almost no one actually specifies that this invariably just says Unspecified. So we could just leave it out unless it's specified.
Together that would simplify the error message in the normal case to:
A timeout occurred after 30000ms selecting a server using CompositeServerSelector{ Selectors = WritableServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "2", ConnectionMode : "Automatic", Type : "ReplicaSet", State : "Connected", Servers : [{ EndPoint: "mongodb01:27017", State: "Connected", Type: "ReplicaSetSecondary", WireVersionRange: "[0, 5]" }, ...
- is related to
-
CSHARP-3775 Make root cause of errors more visible in error messages
- Backlog