diff options
author | Mathias Stearn <mathias@10gen.com> | 2018-01-12 18:32:38 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2018-01-17 17:10:47 -0500 |
commit | 4dc36c7ccb6b5b8f7d865993b5d648fe6dc4b7c7 (patch) | |
tree | e6e3a8d136a91d9f5ca12ebb2a9604fab8c659cf /src/mongo/db/commands.cpp | |
parent | 68b961b28f5dd40501f0ef9b6c6b515ff1ec7cfd (diff) | |
download | mongo-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.cpp | 3 |
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)); } |