Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-834

Return local mongoc errors and server errors in different error spaces

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.0, 4.0.0
    • Component/s: API
    • Major Change
    • 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?

      Right now, libmongoc doesn't give us a way to distinguish server side errors from its own local numeric codes. Worse, some of the codes are in conflict. Our only reasonable option is to surface the raw error code to the user with no additional interpretation.

      Once the C driver has resolved this issue, we should add our own symbolic codes for errors returned by libmongoc to the mongocxx::error_codes enumeration, and populate the mongocxx::server_error_codes enumeration with the contents of error_codes.err.

      All other server codes that don't have symbolic representations will still be surfaced as a numeric code, which will all map to the same string representation.

            Assignee:
            Unassigned Unassigned
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: