diff options
author | samontea <merciers.merciers@gmail.com> | 2020-12-07 17:05:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-12-07 22:06:53 +0000 |
commit | c2deb97265c1b19a193ecdb58be1197bdbbd630f (patch) | |
tree | c488feb093bc2e49f6446d77ba6e010d433cc6b9 /src/mongo/db/stats | |
parent | 957ddd678dbd49a96318a13e8f669567e4eba3ab (diff) | |
download | mongo-c2deb97265c1b19a193ecdb58be1197bdbbd630f.tar.gz |
SERVER-35479 Make $collStats count behavior have "standard" error code and consistent behavior across topologies
Diffstat (limited to 'src/mongo/db/stats')
-rw-r--r-- | src/mongo/db/stats/storage_stats.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/stats/storage_stats.cpp b/src/mongo/db/stats/storage_stats.cpp index e6bd81b2546..e7355f42ed4 100644 --- a/src/mongo/db/stats/storage_stats.cpp +++ b/src/mongo/db/stats/storage_stats.cpp @@ -154,12 +154,12 @@ Status appendCollectionRecordCount(OperationContext* opCtx, BSONObjBuilder* result) { AutoGetCollectionForReadCommand collection(opCtx, nss); if (!collection.getDb()) { - return {ErrorCodes::BadValue, + return {ErrorCodes::NamespaceNotFound, str::stream() << "Database [" << nss.db().toString() << "] not found."}; } if (!collection) { - return {ErrorCodes::BadValue, + return {ErrorCodes::NamespaceNotFound, str::stream() << "Collection [" << nss.toString() << "] not found."}; } |