-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
We use MongoAPIError interchangeably with MongoParseError when parsing connection string, and, moreover, the connection string module has its own version of the MongoParseError. It would be good to standardize the returned error from validating MongoClient options to at least extend from the same class in all of these different cases. We should probably have a separate type for connection string validation errors because we also use MongoParseError when we are literally unable to parse a message (from, e.g. message_stream), so we should not use a "parse error" in situations where we are able to parse options but they happen to be invalid.
Any connection string validation should extend from MongoAPIError.