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

Improve error message when bulkWrite is used on 7.x servers

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Repl 2024-06-24, Repl 2024-07-08, Repl 2024-07-22, Repl 2024-08-19, Repl 2024-09-02, Repl 2024-09-16, Repl 2024-09-30, Repl 2024-10-14, Repl 2024-10-28, Repl 2024-11-11

      Attempting to use the bulkWrite command on 7.x servers yields the following error:

      CommandError

      { code: 40415, code_name: "Location40415", message: "BSON field 'bulkWrite.errorsOnly' is an unknown field.", topology_version: None }

      Pre-7.0 servers return this error instead:

      CommandError

      { code: 59, code_name: "CommandNotFound", message: "no such command: 'bulkWrite'", topology_version: None }

      Since drivers generally forward these kinds of errors directly to users, it would be more clear for 7.x to return the "CommandNotFound" error. The "unknown field" message may not make it clear to users that their server does not support the feature they're attempting to use.

            Assignee:
            sean.zimmerman@mongodb.com Sean Zimmerman
            Reporter:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: