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

Add more information to WriteConflict error message

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Diagnostics, Storage
    • Minor Change
    • Execution Team 2019-09-09

      A WriteConflict error message provides very little information to the user:

      {
        "ok": 0.0,
        "errmsg": "WriteConflict",
        "code": 112,
        "codeName": "WriteConflict",
        "operationTime": <time>,
        "$clusterTime": {},
      }
      

      It would be helpful to have a more detailed error message than just "WriteConflict". For example, we could change it to "Write conflict error: this operation conflicted with another operation, retry your multi-document transaction".

      CC: pasette

            Assignee:
            maria.vankeulen@mongodb.com Maria van Keulen
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: