summaryrefslogtreecommitdiff
path: root/src/mongo/s/cluster_identity_loader.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-01-16 13:00:48 -0500
committerMathias Stearn <mathias@10gen.com>2018-01-17 17:10:47 -0500
commitdaf6c4714b45aeb8ba1a09380135b3267c4cc280 (patch)
treec436a157d25ccb13f91746ba4e099a6396462115 /src/mongo/s/cluster_identity_loader.cpp
parent4dc36c7ccb6b5b8f7d865993b5d648fe6dc4b7c7 (diff)
downloadmongo-daf6c4714b45aeb8ba1a09380135b3267c4cc280.tar.gz
SERVER-32617 Fix code that reconstructs status with just code and string
Diffstat (limited to 'src/mongo/s/cluster_identity_loader.cpp')
-rw-r--r--src/mongo/s/cluster_identity_loader.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mongo/s/cluster_identity_loader.cpp b/src/mongo/s/cluster_identity_loader.cpp
index d3cad97c4d7..8f1fa8adb55 100644
--- a/src/mongo/s/cluster_identity_loader.cpp
+++ b/src/mongo/s/cluster_identity_loader.cpp
@@ -98,9 +98,7 @@ StatusWith<OID> ClusterIdentityLoader::_fetchClusterIdFromConfig(
auto catalogClient = Grid::get(opCtx)->catalogClient();
auto loadResult = catalogClient->getConfigVersion(opCtx, readConcernLevel);
if (!loadResult.isOK()) {
- return Status(loadResult.getStatus().code(),
- str::stream() << "Error loading clusterID"
- << causedBy(loadResult.getStatus().reason()));
+ return loadResult.getStatus().withContext("Error loading clusterID");
}
return loadResult.getValue().getClusterId();
}