Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4243

dropCollection should return false and not throw on ns not found errors

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      As a node driver engineer,
      I want the dropCollection method to suppress ns not found errors,
      So that the unified spec test runner can work without suppressing these errors manually.

      User Impact

      Users calling `dropCollection` will be impacted but the impact should be minimal.  Rather than throwing namespace not found errors, we will return `false`.  The current API for the dropCollection method returns a Promise<boolean>.  Consumers of this method may be checking for a truthy value indicating a successful drop if they care about it, but they could also have a catch block that handles this specific error, in which case this change would be breaking (as dropping a non-existent collection would now be indicated via the successful promise resolve with "false" instead of an error).

      Unknowns

      • Can this go out in a minor release? It's unlikely to really break anyone, but why take the chance given the change doesn't actually benefit our existing users.

      Acceptance Criteria

      • Remove the try-catch handling namespace not found errors from the unified runner.
      • Update dropCollection to return false for namespace not found errors.

      Documentation Requirements

      • n/a

            Assignee:
            Unassigned Unassigned
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: