diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-04-18 21:06:19 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-05-08 15:52:29 -0400 |
commit | e6c9fa2388b3ee6f789b14c5f767ea4c01834090 (patch) | |
tree | 440ba904015ae032fba917da46b4af5ca0201b51 /src/mongo/shell | |
parent | db41862c5380ab33cf28db99726cdac252df0872 (diff) | |
download | mongo-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.js | 3 |
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; |