@opentap/runner-client 2.3.2-alpha.1.7 → 2.3.2-alpha.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/BaseClient.js CHANGED
@@ -139,14 +139,12 @@ var BaseClient = /** @class */ (function () {
139
139
  var offset = chunk * fileDescriptor.chunkSize;
140
140
  return data.slice(offset, offset + fileDescriptor.chunkSize);
141
141
  };
142
- subscription = this.connection.subscribe(replySubject, { timeout: timeout });
142
+ subscription = this.connection.subscribe(replySubject);
143
143
  responsePromise = new Promise(function (resolve, reject) {
144
144
  var messages = [];
145
145
  subscription.callback = function (error, message) {
146
146
  var _a;
147
147
  if (error) {
148
- subscription.unsubscribe();
149
- console.log('error:', error);
150
148
  reject(error);
151
149
  }
152
150
  // Put all the response chunks in an array in the order they are received
@@ -213,7 +211,10 @@ var BaseClient = /** @class */ (function () {
213
211
  this.connection.publish(subject, Empty, opts);
214
212
  }
215
213
  // Now that we have sent the terminating chunk, the result should arrive on our promise.
216
- return [2 /*return*/, this.withTimeout(responsePromise, timeout)];
214
+ return [2 /*return*/, this.withTimeout(responsePromise, timeout).catch(function (err) {
215
+ subscription.unsubscribe();
216
+ return Promise.reject(_this.natsErrorHandler(err, subject));
217
+ })];
217
218
  });
218
219
  });
219
220
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentap/runner-client",
3
- "version": "2.3.2-alpha.1.7",
3
+ "version": "2.3.2-alpha.1.8",
4
4
  "description": "This is the web client for the OpenTAP Runner.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",