[SERVER-39051] Improve "no option found to get" error message text Created: 16/Jan/19  Updated: 03/Mar/23

Status: Backlog
Project: Core Server
Component/s: Shell
Affects Version/s: 4.0.3
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Oleg Pudeyev (Inactive) Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Unresolved Votes: 1
Labels: move-stm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-39052 Reading and writing FCV is asymmetric... Backlog
Assigned Teams:
Server Tooling & Methods
Participants:
Case:

 Description   

I attempted to execute the following against a sharded cluster:

(byebug) client.use(:admin).command(getParameter: 1, featureCompatibilityVersion: 1)
*** Mongo::Error::OperationFailure Exception: no option found to get ()

Shell version:

speed% mongo --port 29400
MongoDB shell version v3.6.9
connecting to: mongodb://127.0.0.1:29400/
Implicit session: session { "id" : UUID("fcdf70ad-6fb0-4e84-b880-2d762d4030fb") }
MongoDB server version: 4.0.4-92-ga3ed66ac2e
WARNING: shell and server versions do not match
Server has startup warnings: 
2019-01-16T14:42:39.279-0500 I CONTROL  [main] 
2019-01-16T14:42:39.279-0500 I CONTROL  [main] ** WARNING: Access control is not enabled for the database.
2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          Read and write access to data and configuration is unrestricted.
2019-01-16T14:42:39.279-0500 I CONTROL  [main] 
2019-01-16T14:42:39.279-0500 I CONTROL  [main] ** WARNING: This server is bound to localhost.
2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          Remote systems will be unable to connect to this server. 
2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          Start the server with --bind_ip <address> to specify which IP 
2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          addresses it should serve responses from, or with --bind_ip_all to
2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          bind to all interfaces. If this behavior is desired, start the
2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          server with --bind_ip 127.0.0.1 to disable this warning.
2019-01-16T14:42:39.279-0500 I CONTROL  [main] 
mongos> db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
{
	"ok" : 0,
	"errmsg" : "no option found to get",
	"operationTime" : Timestamp(1547668183, 1),
	"$clusterTime" : {
		"clusterTime" : Timestamp(1547668183, 1),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	}
}

The phrase "no option found to get" is confusing for the following reasons:

1. I requested to get a parameter, the error message talks about an option.
2. "no option" seems to imply that I requested several, whereas I requested only one.
3. Can I insert an option like I insert data, so that later this option would be "found"?

A more clear message to me would be something like the following:

  • Unrecognized parameter "featureCompatibilityVersion"
  • Unknown parameter "featureCompatibilityVersion"

A better yet message would say something like:

  • Parameter "featureCompatibilityVersion" is not supported for mongos

Also, this error message came without a numeric code.



 Comments   
Comment by Steven Vannelli [ 10/May/22 ]

Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions.

Generated at Thu Feb 08 04:50:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.