From e6c9fa2388b3ee6f789b14c5f767ea4c01834090 Mon Sep 17 00:00:00 2001 From: Siyuan Zhou Date: Wed, 18 Apr 2018 21:06:19 -0400 Subject: SERVER-34256 Expose TransientTxnError error labels in response. --- src/mongo/shell/bulk_api.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mongo/shell') 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; -- cgit v1.2.1