GODRIVER-4009ClosedDuplicate

IsDuplicateKeyError doesn’t work with ClientBulkWriteException

h3. Detailed steps to reproduce the problem? ``` func IsDuplicateKeyError(err error) bool { if se := ServerError(nil); errors.As(err, &se) { return se.HasErrorCode(11000) || // Duplicate key error. se.HasErrorCode(11001) || // Duplicate key error on update. // Duplicate key error in a capped collection. See SERVER-7164. se.HasErrorCode(12582) || // Mongos insert error caused by a duplicate key error. See // SERVER-11493. se.HasErrorCodeWithMessage(16460, " E11000 "

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.