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:
parent
0144f59236
commit
8b1c4e3824
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user