summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2014-01-30 12:59:55 -0500
committerEric Milkie <milkie@10gen.com>2014-01-30 18:02:18 -0500
commit0455a09b22d2e5fc7d0fa47e0fd8f83a9d3e03e6 (patch)
tree32211109230e12de82dcaf8e246abe68db57ce28
parent5548dbb7a13936911b1b482ddd417cf5879e01b4 (diff)
downloadmongo-0455a09b22d2e5fc7d0fa47e0fd8f83a9d3e03e6.tar.gz
SERVER-12419 fix error status codes to match what batch_downconvert expects
-rw-r--r--src/mongo/db/commands/get_last_error.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/get_last_error.cpp b/src/mongo/db/commands/get_last_error.cpp
index 04ddf3cc647..868af360f64 100644
--- a/src/mongo/db/commands/get_last_error.cpp
+++ b/src/mongo/db/commands/get_last_error.cpp
@@ -219,7 +219,7 @@ namespace mongo {
// Ignore electionIds of 0 from mongos.
if (electionId != OID()) {
errmsg = "wElectionId passed but no replication active";
- result.append("code", ErrorCodes::NoReplicationEnabled);
+ result.append("code", ErrorCodes::BadValue);
return false;
}
}
@@ -228,7 +228,7 @@ namespace mongo {
LOG(3) << "oid passed in is " << electionId
<< ", but our id is " << theReplSet->getElectionId();
errmsg = "election occurred after write";
- result.append("code", ErrorCodes::OperationIncomplete);
+ result.append("code", ErrorCodes::WriteConcernFailed);
return false;
}
}