-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Per HELP-18449, it looks like error labels are only ever returned at the top level of a command response, but we actually have them nested in write concern errors present in either ErrorKind::Write and ErrorKind::BulkWrite. We also have them embedded in ErrorKind::Command, but that's technically correct. However, we also store them outside of ErrorKind in the private Error::labels field. For both simplicity and correctness, we eliminated any mention of labels from ErrorKind and its descendants and centralize them to Error instead.