summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-01-12 18:32:38 -0500
committerMathias Stearn <mathias@10gen.com>2018-01-17 17:10:47 -0500
commit4dc36c7ccb6b5b8f7d865993b5d648fe6dc4b7c7 (patch)
treee6e3a8d136a91d9f5ca12ebb2a9604fab8c659cf /src/mongo/db/commands.cpp
parent68b961b28f5dd40501f0ef9b6c6b515ff1ec7cfd (diff)
downloadmongo-4dc36c7ccb6b5b8f7d865993b5d648fe6dc4b7c7.tar.gz
SERVER-32684 Make mongos write command objects hold Status directly
Diffstat (limited to 'src/mongo/db/commands.cpp')
-rw-r--r--src/mongo/db/commands.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp
index 488277b02ea..439a4783822 100644
--- a/src/mongo/db/commands.cpp
+++ b/src/mongo/db/commands.cpp
@@ -186,8 +186,7 @@ void CommandHelpers::appendCommandWCStatus(BSONObjBuilder& result,
const WriteConcernResult& wcResult) {
if (!awaitReplicationStatus.isOK() && !result.hasField("writeConcernError")) {
WriteConcernErrorDetail wcError;
- wcError.setErrCode(awaitReplicationStatus.code());
- wcError.setErrMessage(awaitReplicationStatus.reason());
+ wcError.setStatus(awaitReplicationStatus);
if (wcResult.wTimedOut) {
wcError.setErrInfo(BSON("wtimeout" << true));
}