Skip to content

Commit f026ee3

Browse files
committed
Update the documentation of ClientBulkWriteException and remove a TODO
JAVA-5527
1 parent 21bb22e commit f026ee3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

driver-core/src/main/com/mongodb/ClientBulkWriteException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333

3434
/**
3535
* The result of an unsuccessful or partially unsuccessful client-level bulk write operation.
36+
* Note that the {@linkplain #getCode() code} and {@linkplain #getErrorLabels() labels} from this exception are not useful.
37+
* An application should use those from the {@linkplain #getError() top-level error}.
3638
*
3739
* @see ClientBulkWriteResult
3840
* @since 5.3
@@ -64,8 +66,6 @@ public ClientBulkWriteException(
6466
@Nullable final ClientBulkWriteResult partialResult,
6567
final ServerAddress serverAddress) {
6668
super(message(error, writeConcernErrors, writeErrors, partialResult, serverAddress), serverAddress);
67-
// BULK-TODO Should ClientBulkWriteException.getCode be the same as error.getCode,
68-
// and getErrorLabels/hasErrorLabel contain the same labels as error.getErrorLabels?
6969
isTrueArgument("At least one of `writeConcernErrors`, `writeErrors`, `partialResult` must be non-null or non-empty",
7070
!(writeConcernErrors == null || writeConcernErrors.isEmpty())
7171
|| !(writeErrors == null || writeErrors.isEmpty())

0 commit comments

Comments
 (0)