Skip to content

Commit 5e76f54

Browse files
committed
Revise error messages for readConcern and writeConcern in transactions
The transaction spec requires certain language, and this is now expected in spec test for clientBulkWrite.
1 parent b55dbcc commit 5e76f54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/Exception/UnsupportedException.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static function hintNotSupported(): self
4747
*/
4848
public static function readConcernNotSupportedInTransaction(): self
4949
{
50-
return new self('The "readConcern" option cannot be specified within a transaction. Instead, specify it when starting the transaction.');
50+
return new self('Cannot set read concern after starting a transaction. Instead, specify the "readConcern" option when starting the transaction.');
5151
}
5252

5353
/**
@@ -57,6 +57,6 @@ public static function readConcernNotSupportedInTransaction(): self
5757
*/
5858
public static function writeConcernNotSupportedInTransaction(): self
5959
{
60-
return new self('The "writeConcern" option cannot be specified within a transaction. Instead, specify it when starting the transaction.');
60+
return new self('Cannot set write concern after starting a transaction. Instead, specify the "writeConcern" option when starting the transaction.');
6161
}
6262
}

0 commit comments

Comments
 (0)