Embedded writeErrors do not report errorLabels

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      For bulk operations, many distinct errors can be reported, since each of the sub operations may fail for a different reason. These sub errors (usually in the form of writeErrors) report the typical error information such as code, errmsg, codeName, etc, but they do not encode errorLabels, which are only applied at the top level.

      These labels are useful for end users' handling of the errors, though. We should ensure that these labels are preserved in some way, either in the individual errors themselves or at the top level.

      e.g. example response today

      {
        'ok': 1
        'writeErrors': [
             {
                   'index': 1, 
                   'code': 433, 
                   'errmsg': 'MongoDB is overloaded and cannot accept new operations. Try again later.' ... 
             }
      } 
      

            Assignee:
            Unassigned
            Reporter:
            Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: