0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00

SERVER-15854 Use ShardNotFound error code for deleted shard

This commit is contained in:
Daniel Alabi 2015-03-12 18:49:41 -04:00
parent 0144f59236
commit 8b1c4e3824

View File

@ -102,10 +102,12 @@ namespace {
Shard s = Shard::findIfExists(target);
if (s == Shard::EMPTY) {
errmsg = str::stream() << "shard '" << target << "'"
<< " does not exist";
log() << errmsg;
return false;
string msg(str::stream() <<
"Could not drop shard '" << target <<
"' because it does not exist");
log() << msg;
return appendCommandStatus(result,
Status(ErrorCodes::ShardNotFound, msg));
}
ScopedDbConnection conn(configServer.getPrimary().getConnString(), 30);