-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
The description.NewServer and fsm.apply functions create or modify server descriptions. Both of those functions set any errors that happen on the returned or modified description.Server struct instead of returning it as part of the function signature. That deviates from typical Go function signatures and can lead to bugs if someone doesn't realize they need to check the LastError field on the returned struct. Update both functions to return errors as well as set the error in the LastError field. Update calling code to check the returned error instead of the error on the description.Server
Definition of done:
- Update description.NewServer and fsm.apply to return an error.
- Update all calling code to check the returned error instead of the description.Server.LastError field.
- depends on
-
GODRIVER-2965 Make the "description" package internal
- Closed
- is related to
-
GODRIVER-2691 Deprecate "description.Server" fields that don't come from a handshake
- Closed
-
GODRIVER-2965 Make the "description" package internal
- Closed