Support for error codes in command results and exceptions

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 1.0
    • Component/s: Feature Request
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I would like to suggest adding support for error codes in command results and (probably) exceptions, so handling specific type of errors is easier.
      Comparing error messages to a predefined string seems weak to me. While current driver has only one such spot (the 'commandResult.ErrorMessage == "not master"' check in MongoDatabase.cs, I don't know if this is the only and proper message to close connection for), not having access to error code makes writing robust client-side code harder.

              Assignee:
              Unassigned
              Reporter:
              Aristarkh Zagorodnikov
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: