summaryrefslogtreecommitdiff
path: root/src/mongo/shell
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2018-04-18 21:06:19 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2018-05-08 15:52:29 -0400
commite6c9fa2388b3ee6f789b14c5f767ea4c01834090 (patch)
tree440ba904015ae032fba917da46b4af5ca0201b51 /src/mongo/shell
parentdb41862c5380ab33cf28db99726cdac252df0872 (diff)
downloadmongo-e6c9fa2388b3ee6f789b14c5f767ea4c01834090.tar.gz
SERVER-34256 Expose TransientTxnError error labels in response.
Diffstat (limited to 'src/mongo/shell')
-rw-r--r--src/mongo/shell/bulk_api.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/shell/bulk_api.js b/src/mongo/shell/bulk_api.js
index 0e63b97d029..6caa50374e6 100644
--- a/src/mongo/shell/bulk_api.js
+++ b/src/mongo/shell/bulk_api.js
@@ -400,6 +400,9 @@ var _bulk_api_module = (function() {
// Define properties
defineReadOnlyProperty(this, "code", commandError.code);
defineReadOnlyProperty(this, "errmsg", commandError.errmsg);
+ if (commandError.hasOwnProperty("errorLabels")) {
+ defineReadOnlyProperty(this, "errorLabels", commandError.errorLabels);
+ }
this.name = 'WriteCommandError';
this.message = this.errmsg;