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

Give a helpful error when test APIs are accessed without enableTestCommands.

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution

      SERVER-88630 confused several people until it was realized that the failure's cause was that enableTestCommands was disabled.

      This ticket proposes that, instead of:

      Unrecognized expression '$_testApiVersion'
      

      ... the server should give an error like:

      Expression '$_testApiVersion' is for MongoDB's internal testing only.
      

      This will deter external users appropriately, and folks who—like me —actually need to use it will know to ask in an appropriate forum, "how can I use internal-testing controls like $_testApiVersion?"

      (The message could additionally actually say that enableTestCommands is the setting to enable, but that may make it too easy for users to hurt themselves.)

            Assignee:
            Unassigned Unassigned
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: