summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/cluster_write_without_shard_key_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/commands/cluster_write_without_shard_key_cmd.cpp')
-rw-r--r--src/mongo/s/commands/cluster_write_without_shard_key_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/s/commands/cluster_write_without_shard_key_cmd.cpp b/src/mongo/s/commands/cluster_write_without_shard_key_cmd.cpp
index 935f41de692..c3668182621 100644
--- a/src/mongo/s/commands/cluster_write_without_shard_key_cmd.cpp
+++ b/src/mongo/s/commands/cluster_write_without_shard_key_cmd.cpp
@@ -100,7 +100,7 @@ BSONObj _createCmdObj(OperationContext* opCtx,
const BSONObj& writeCmd,
const BSONObj& targetDocId) {
const auto cri = uassertStatusOK(getCollectionRoutingInfoForTxnCmd(opCtx, nss));
- uassert(ErrorCodes::InvalidOptions,
+ uassert(ErrorCodes::NamespaceNotSharded,
"_clusterWriteWithoutShardKey can only be run against sharded collections.",
cri.cm.isSharded());
const auto shardVersion = cri.getShardVersion(shardId);