diff options
author | Scott Hernandez <scotthernandez@gmail.com> | 2014-02-24 08:46:02 -0500 |
---|---|---|
committer | Scott Hernandez <scotthernandez@gmail.com> | 2014-02-24 10:44:20 -0500 |
commit | c1c58e880285c7ecd9eba3cb961068954a017249 (patch) | |
tree | 55cfc22292c195ee30c3bdf8c85f5bc1361f20fc /src/mongo/shell/shell_utils.cpp | |
parent | 64d61703a6ef9986608861cd5614ae2c0bf05cf4 (diff) | |
download | mongo-c1c58e880285c7ecd9eba3cb961068954a017249.tar.gz |
SERVER-12838: return status reason
Diffstat (limited to 'src/mongo/shell/shell_utils.cpp')
-rw-r--r-- | src/mongo/shell/shell_utils.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp index a4597fb99f7..b9b256c1c7e 100644 --- a/src/mongo/shell/shell_utils.cpp +++ b/src/mongo/shell/shell_utils.cpp @@ -155,7 +155,8 @@ namespace mongo { BSONObj key = a[0].Obj(); Status indexValid = validateKeyPattern(key); if (!indexValid.isOK()) { - return BSON("" << BSON("ok" << false << "errmsg" << indexValid.codeString())); + return BSON("" << BSON("ok" << false << "type" + << indexValid.codeString() << "errmsg" << indexValid.reason())); } return BSON("" << BSON("ok" << true)); } |