Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-20810

Find command errors should not include a stack trace

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc0
    • Affects Version/s: 3.1.9
    • Component/s: Querying, Shell
    • Labels:
      None
    • Fully Compatible
    • QuInt A (10/12/15)

      Here is an example command an error in the 3.1.9 shell when it is configured to use find command:

      mongos> db.messages.find({},{_id:0,'headers.From':1,'headers.Subject':1,'headers.Date':1}).batchSize(10);
      assert: command failed: {
      	"ok" : 0,
      	"errmsg" : "Retried 10 times without establishing shard version on a reachable host.",
      	"code" : 63
      } : undefined
      _getErrorWithCode@src/mongo/shell/utils.js:23:13
      doassert@src/mongo/shell/assert.js:13:14
      assert.commandWorked@src/mongo/shell/assert.js:259:5
      DBCommandCursor@src/mongo/shell/query.js:657:5
      DBQuery.prototype._exec@src/mongo/shell/query.js:103:28
      DBQuery.prototype.hasNext@src/mongo/shell/query.js:257:5
      DBQuery.prototype.shellPrint@src/mongo/shell/query.js:500:17
      shellPrintHelper@src/mongo/shell/utils.js:444:1
      @(shell2):1:1
      
      Error: command failed: {
      	"ok" : 0,
      	"errmsg" : "Retried 10 times without establishing shard version on a reachable host.",
      	"code" : 63
      } : undefined
      

      And here is what you get with the 3.0.6 shell or the 3.1.9 shell with wire protocol find:

      mongos> db.messages.find({},{_id:0,'headers.From':1,'headers.Subject':1,'headers.Date':1}).batchSize(10);
      Error: error: {
      	"$err" : "Retried 10 times without establishing shard version on a reachable host.",
      	"code" : 63
      }
      

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            schwerin@mongodb.com Andy Schwerin
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: