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

ErrorCodes::KeyNotFound and ErrorCodes::NoSuchKey are ambiguous

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • SP Prioritized List

      The KeyNotFound and NoSuchKey code names may cause confusion to readers. Apparently, KeyNotFound refers to indexes, while NoSuchKey is used to indicate a field is not found within a BSON object. Making the names more explicit would help readability and make incorrect use less likely.

      There is at least one location (storage_interface_impl.cpp) where NoSuchKey is used to indicate no documents were found.

            Assignee:
            Unassigned Unassigned
            Reporter:
            yujin.kang@mongodb.com Yujin Kang Park
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: