@webex/plugin-meetings 3.8.0-next.54 → 3.8.0-next.55

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.
@@ -85,9 +85,15 @@ export { IceGatheringFailed };
85
85
  * @extends WebexMeetingsError
86
86
  * @property {number} code - 30203
87
87
  * @property {string} message - 'Failed to add media'
88
+ * @property {Error} [cause] - The underlying error that caused the failure
88
89
  */
89
90
  declare class AddMediaFailed extends WebexMeetingsError {
90
91
  static CODE: number;
91
- constructor();
92
+ cause?: Error;
93
+ /**
94
+ * Creates a new AddMediaFailed error
95
+ * @param {Error} [cause] - The underlying error that caused the media addition to fail
96
+ */
97
+ constructor(cause?: Error);
92
98
  }
93
99
  export { AddMediaFailed };
@@ -458,7 +458,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
458
458
  }, _callee7);
459
459
  }))();
460
460
  },
461
- version: "3.8.0-next.54"
461
+ version: "3.8.0-next.55"
462
462
  });
463
463
  var _default = exports.default = Webinar;
464
464
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -43,7 +43,7 @@
43
43
  "@webex/eslint-config-legacy": "0.0.0",
44
44
  "@webex/jest-config-legacy": "0.0.0",
45
45
  "@webex/legacy-tools": "0.0.0",
46
- "@webex/plugin-meetings": "3.8.0-next.54",
46
+ "@webex/plugin-meetings": "3.8.0-next.55",
47
47
  "@webex/plugin-rooms": "3.8.0-next.21",
48
48
  "@webex/test-helper-chai": "3.8.0-next.17",
49
49
  "@webex/test-helper-mocha": "3.8.0-next.17",
@@ -71,7 +71,7 @@
71
71
  "@webex/internal-plugin-metrics": "3.8.0-next.17",
72
72
  "@webex/internal-plugin-support": "3.8.0-next.21",
73
73
  "@webex/internal-plugin-user": "3.8.0-next.17",
74
- "@webex/internal-plugin-voicea": "3.8.0-next.54",
74
+ "@webex/internal-plugin-voicea": "3.8.0-next.55",
75
75
  "@webex/media-helpers": "3.8.0-next.19",
76
76
  "@webex/plugin-people": "3.8.0-next.19",
77
77
  "@webex/plugin-rooms": "3.8.0-next.21",
@@ -92,5 +92,5 @@
92
92
  "//": [
93
93
  "TODO: upgrade jwt-decode when moving to node 18"
94
94
  ],
95
- "version": "3.8.0-next.54"
95
+ "version": "3.8.0-next.55"
96
96
  }
@@ -152,12 +152,19 @@ WebExMeetingsErrors[IceGatheringFailed.CODE] = IceGatheringFailed;
152
152
  * @extends WebexMeetingsError
153
153
  * @property {number} code - 30203
154
154
  * @property {string} message - 'Failed to add media'
155
+ * @property {Error} [cause] - The underlying error that caused the failure
155
156
  */
156
157
  class AddMediaFailed extends WebexMeetingsError {
157
158
  static CODE = 30203;
159
+ cause?: Error;
158
160
 
159
- constructor() {
161
+ /**
162
+ * Creates a new AddMediaFailed error
163
+ * @param {Error} [cause] - The underlying error that caused the media addition to fail
164
+ */
165
+ constructor(cause?: Error) {
160
166
  super(AddMediaFailed.CODE, 'Failed to add media');
167
+ this.cause = cause;
161
168
  }
162
169
  }
163
170
  export {AddMediaFailed};
@@ -7159,12 +7159,18 @@ export default class Meeting extends StatelessWebexPlugin {
7159
7159
  },
7160
7160
  options: {
7161
7161
  meetingId: this.id,
7162
+ rawError: error,
7162
7163
  },
7163
7164
  });
7164
7165
  }
7165
- throw new Error(
7166
+
7167
+ const timedOutError = new Error(
7166
7168
  `Timed out waiting for media connection to be connected, correlationId=${this.correlationId}`
7167
7169
  );
7170
+
7171
+ timedOutError.cause = error;
7172
+
7173
+ throw timedOutError;
7168
7174
  }
7169
7175
  }
7170
7176
 
@@ -7225,6 +7231,9 @@ export default class Meeting extends StatelessWebexPlugin {
7225
7231
  ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT / 1000
7226
7232
  } seconds`
7227
7233
  );
7234
+
7235
+ const error = new Error('Timed out waiting for REMOTE SDP ANSWER');
7236
+
7228
7237
  // @ts-ignore
7229
7238
  this.webex.internal.newMetrics.submitClientEvent({
7230
7239
  name: 'client.media-engine.remote-sdp-received',
@@ -7237,10 +7246,10 @@ export default class Meeting extends StatelessWebexPlugin {
7237
7246
  }),
7238
7247
  ],
7239
7248
  },
7240
- options: {meetingId: this.id, rawError: new Error('Timeout waiting for SDP answer')},
7249
+ options: {meetingId: this.id, rawError: error},
7241
7250
  });
7242
7251
 
7243
- deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
7252
+ deferSDPAnswer.reject(error);
7244
7253
  }, ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
7245
7254
 
7246
7255
  LoggerProxy.logger.info(`${LOG_HEADER} waiting for REMOTE SDP ANSWER...`);
@@ -7345,7 +7354,7 @@ export default class Meeting extends StatelessWebexPlugin {
7345
7354
  error
7346
7355
  );
7347
7356
 
7348
- throw new AddMediaFailed();
7357
+ throw new AddMediaFailed(error);
7349
7358
  }
7350
7359
  }
7351
7360
 
@@ -2762,7 +2762,8 @@ describe('plugin-meetings', () => {
2762
2762
  turnDiscoverySkippedReason: undefined,
2763
2763
  });
2764
2764
  meeting.meetingState = 'ACTIVE';
2765
- meeting.mediaProperties.waitForMediaConnectionConnected.rejects({iceConnected: false});
2765
+ const error = {iceConnected: false}
2766
+ meeting.mediaProperties.waitForMediaConnectionConnected.rejects(error);
2766
2767
 
2767
2768
  const forceRtcMetricsSend = sinon.stub().resolves();
2768
2769
  const closeMediaConnectionStub = sinon.stub();
@@ -2780,6 +2781,7 @@ describe('plugin-meetings', () => {
2780
2781
  })
2781
2782
  .catch((err) => {
2782
2783
  errorThrown = err;
2784
+ assert.instanceOf(err.cause, Error);
2783
2785
  assert.instanceOf(err, AddMediaFailed);
2784
2786
  });
2785
2787
 
@@ -2836,6 +2838,7 @@ describe('plugin-meetings', () => {
2836
2838
  },
2837
2839
  options: {
2838
2840
  meetingId: meeting.id,
2841
+ rawError: error,
2839
2842
  },
2840
2843
  });
2841
2844
  assert.calledWith(webex.internal.newMetrics.submitClientEvent.thirdCall, {
@@ -2847,6 +2850,7 @@ describe('plugin-meetings', () => {
2847
2850
  },
2848
2851
  options: {
2849
2852
  meetingId: meeting.id,
2853
+ rawError: error,
2850
2854
  },
2851
2855
  });
2852
2856
 
@@ -2975,10 +2979,13 @@ describe('plugin-meetings', () => {
2975
2979
  },
2976
2980
  turnDiscoverySkippedReason: undefined,
2977
2981
  });
2982
+
2983
+ const mediaConnectionError = new Error('fake error');
2984
+
2978
2985
  meeting.mediaProperties.waitForMediaConnectionConnected = sinon
2979
2986
  .stub()
2980
2987
  .onFirstCall()
2981
- .rejects()
2988
+ .rejects(mediaConnectionError)
2982
2989
  .onSecondCall()
2983
2990
  .resolves();
2984
2991
 
@@ -3047,6 +3054,7 @@ describe('plugin-meetings', () => {
3047
3054
  },
3048
3055
  options: {
3049
3056
  meetingId: meeting.id,
3057
+ rawError: mediaConnectionError,
3050
3058
  },
3051
3059
  });
3052
3060
  assert.calledWith(webex.internal.newMetrics.submitClientEvent.thirdCall, {
@@ -3957,6 +3965,9 @@ describe('plugin-meetings', () => {
3957
3965
  },
3958
3966
  options: {
3959
3967
  meetingId: meeting.id,
3968
+ rawError: {
3969
+ iceConnected: false,
3970
+ }
3960
3971
  },
3961
3972
  },
3962
3973
  ]);