Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1252

Improve error handling in new 2.0 driver

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1, 2.1
    • Component/s: Error Handling
    • Labels:
      None
    • Sprint:
      C# Sprint 19

      Description

      The 1.* version was able to provide server-side messages on all write operations. The application was able to rely on those. Now all errors are being replaced with exceptions that is a good improvement. But messages in those exceptions are very generic and cannot be used nor by the application, nor for debugging purposes to resolve the issue.

      For example unique index violation on the server side produces the MongoBulkWriteException with the following message "A bulk write operation resulted in one or more errors." - no mentioning of index even...

      The other example, client side this time. The use of "." in the BsonElement for the field name (like "name.partial") is prohibitive. But trying to use such will result into the EndOfStreamException with generic message as well.

      It would be very helpful if exception messages describe what the issue is, not what the decision is being made by the driver; and server-side messages must be preserved as they are helpful.

        Attachments

          Activity

            People

            Assignee:
            craiggwilson Craig Wilson
            Reporter:
            lennygran Lenny Granovsky
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: