[GODRIVER-559] Improve server selection error messages for connection and context errors Created: 17/Sep/18 Updated: 28/Oct/23 Resolved: 15/Jul/20 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Error Handling |
| Affects Version/s: | None |
| Fix Version/s: | 1.5.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Golden | Assignee: | Kriti Ravindran (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Epic Link: | GODRIVER-114 | ||||||||||||||||||||||||
| Description |
|
New Description: If there's a configuration error that prevents any connection handshakes from succeeding (e.g. configuring a Client with no TLS enabled when the server requires TLS connections), all operations will fail with a server selection timeout error. The error message will be something like:
The error reported from Last error: ... is of type ConnectionError and could be improved. Some ideas:
The previous description mentioned failing fast for TLS errors rather than waiting for server selection to time out. We won't be doing this because there are edge cases where only a subset of servers are unreachable due to TLS errors and some TLS errors can be transient (e.g. OCSP responses are cached so it's possible the response changes after the cached version expires) so it's important that we block for the server selection period and report the full state of all servers in the error message.
Previous Description: When there is a TLS error, such as connecting without TLS to a server that requires it or vice-versa, or when connecting with an invalid certificate, the Go driver eventually fails server selection with an error but gives no indication of the reason why. This is going to cause confusion for users and increase support inquiries. As we have no TLS spec, we never actually say anywhere that a TLS error needs to be reported, but it can be implied from both the auth spec (about handshake errors being auth errors, which need to fail fast and be reported with details) and the server selection spec (about reporting "useful" error messages when selection fails). |
| Comments |
| Comment by Githook User [ 12/Aug/20 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}Message: |
| Comment by Githook User [ 15/Jul/20 ] |
|
Author: {'name': 'Kriti Ravindran', 'email': 'kriti.ravindran@mongodb.com', 'username': 'KritiRav'}Message: |