-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Dev Exp
-
None
https://github.com/mongodb/specifications/blob/master/source/initial-dns-seedlist-discovery/initial-dns-seedlist-discovery.rst#seedlist-discovery has this language:
> A driver MUST verify that in addition to the {hostname}, the {domainname} consists of at least two parts: the domain name, and a TLD.
It makes sense in the spec, but when copied to an exception message, it becomes confusing:
irb(main):002:0> a=Mongo::Client.new('mongodb+srv://hai.xx') Mongo::Error::InvalidURI (Bad URI: mongodb+srv://hai.xx) The domain name must consist of at least two parts: the domain name, and a TLD. MongoDB URI must be in the following format: mongodb+srv://[username:password@]host[/[database][?options]] Please see the following URL for more information: http://docs.mongodb.org/manual/reference/connection-string/
From the user's perspective,`hai.xx` is a domain name, it has two parts, a domain name and a TLD.
A better error message would state the requirement of 3 total parts, similar to:
> The domain name must consist of at least three parts (e.g. host.domain.tld).
- duplicates
-
RUBY-1749 Two-part hostnames are accepted by the driver for SRV queries with a trailing dot
- Closed