@@ -347,12 +347,12 @@ func getError(rdr bsoncore.Document) error {
347
347
}
348
348
case "errorLabels" :
349
349
if arr , okay := elem .Value ().ArrayOK (); okay {
350
- elems , err := arr .Elements ()
350
+ vals , err := arr .Values ()
351
351
if err != nil {
352
352
continue
353
353
}
354
- for _ , elem := range elems {
355
- if str , ok := elem . Value () .StringValueOK (); ok {
354
+ for _ , val := range vals {
355
+ if str , ok := val .StringValueOK (); ok {
356
356
labels = append (labels , str )
357
357
}
358
358
}
@@ -404,12 +404,12 @@ func getError(rdr bsoncore.Document) error {
404
404
copy (wcError .WriteConcernError .Details , info )
405
405
}
406
406
if errLabels , exists := doc .Lookup ("errorLabels" ).ArrayOK (); exists {
407
- elems , err := errLabels .Elements ()
407
+ vals , err := errLabels .Values ()
408
408
if err != nil {
409
409
continue
410
410
}
411
- for _ , elem := range elems {
412
- if str , ok := elem . Value () .StringValueOK (); ok {
411
+ for _ , val := range vals {
412
+ if str , ok := val .StringValueOK (); ok {
413
413
labels = append (labels , str )
414
414
}
415
415
}
0 commit comments