@opentap/runner-client 2.1.3-alpha.1.3 → 2.1.3-alpha.1.5

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
@@ -138,8 +138,9 @@ var BaseClient = /** @class */ (function () {
138
138
  response = jsonCodec.decode(message.data);
139
139
  }
140
140
  if (_this.isErrorResponse(response)) {
141
- _this.eventEmitter.emit('errorEvent', response);
142
- return Promise.reject(ErrorResponse.fromJS(response));
141
+ var error = ErrorResponse.fromJS(response);
142
+ _this.eventEmitter.emit('errorEvent', error);
143
+ return Promise.reject(error);
143
144
  }
144
145
  return Promise.resolve(response);
145
146
  })
@@ -274,12 +275,13 @@ var BaseClient = /** @class */ (function () {
274
275
  * @returns Promise of an object
275
276
  */
276
277
  BaseClient.prototype.requestChunked = function (subject, replySubject, payload, options, isFullSubject, rawResponse) {
277
- var _a;
278
278
  return __awaiter(this, void 0, void 0, function () {
279
279
  var fileSize;
280
280
  var _this = this;
281
- return __generator(this, function (_b) {
282
- if ((_a = this.connection) === null || _a === void 0 ? void 0 : _a.isClosed())
281
+ return __generator(this, function (_a) {
282
+ if (!this.connection)
283
+ return [2 /*return*/, Promise.reject("".concat(subject, ": Connection is down! Please try again!"))];
284
+ if (this.connection.isClosed())
283
285
  return [2 /*return*/, Promise.reject("".concat(subject, ": Connection has been closed! Please reconnect!"))];
284
286
  fileSize = -1;
285
287
  return [2 /*return*/, new Promise(function (resolve, reject) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentap/runner-client",
3
- "version": "2.1.3-alpha.1.3",
3
+ "version": "2.1.3-alpha.1.5",
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",