@webex/plugin-meetings 3.12.0-next.130 → 3.12.0-next.132

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.
@@ -77,5 +77,6 @@ export type ReplacesInfo = {
77
77
  };
78
78
  export declare const LocusErrorCodes: {
79
79
  readonly LOCUS_INACTIVE: 2403004;
80
+ readonly LOCUS_USER_FULL: 2423001;
80
81
  };
81
82
  export type LocusErrorCodes = Enum<typeof LocusErrorCodes>;
@@ -1608,6 +1608,7 @@ export default class Meeting extends StatelessWebexPlugin {
1608
1608
  * @returns {boolean}
1609
1609
  */
1610
1610
  private isErrorMeaningLocusDroppedUs;
1611
+ private isLocusUserFullError;
1611
1612
  /**
1612
1613
  * Determines if the next media attempt should use only TURN-TLS (iceTransportPolicy='relay').
1613
1614
  * We do this in the hope that it will minimize the chance of Homer sending DTLS packets on a wrong
@@ -869,7 +869,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
869
869
  }, _callee1);
870
870
  }))();
871
871
  },
872
- version: "3.12.0-next.130"
872
+ version: "3.12.0-next.132"
873
873
  });
874
874
  var _default = exports.default = Webinar;
875
875
  //# 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-rooms": "3.12.0-next.50",
46
+ "@webex/plugin-rooms": "3.12.0-next.51",
47
47
  "@webex/test-helper-chai": "3.12.0-next.6",
48
48
  "@webex/test-helper-mocha": "3.12.0-next.6",
49
49
  "@webex/test-helper-mock-webex": "3.12.0-next.6",
@@ -63,17 +63,17 @@
63
63
  "@webex/common": "3.12.0-next.6",
64
64
  "@webex/event-dictionary-ts": "^1.0.2215",
65
65
  "@webex/internal-media-core": "2.29.1",
66
- "@webex/internal-plugin-conversation": "3.12.0-next.50",
66
+ "@webex/internal-plugin-conversation": "3.12.0-next.51",
67
67
  "@webex/internal-plugin-device": "3.12.0-next.44",
68
68
  "@webex/internal-plugin-llm": "3.12.0-next.51",
69
69
  "@webex/internal-plugin-mercury": "3.12.0-next.48",
70
70
  "@webex/internal-plugin-metrics": "3.12.0-next.44",
71
- "@webex/internal-plugin-support": "3.12.0-next.50",
71
+ "@webex/internal-plugin-support": "3.12.0-next.51",
72
72
  "@webex/internal-plugin-user": "3.12.0-next.45",
73
73
  "@webex/internal-plugin-voicea": "3.12.0-next.53",
74
74
  "@webex/media-helpers": "3.12.0-next.12",
75
75
  "@webex/plugin-people": "3.12.0-next.48",
76
- "@webex/plugin-rooms": "3.12.0-next.50",
76
+ "@webex/plugin-rooms": "3.12.0-next.51",
77
77
  "@webex/ts-sdp": "^1.8.1",
78
78
  "@webex/web-capabilities": "^1.13.0",
79
79
  "@webex/webex-core": "3.12.0-next.44",
@@ -94,5 +94,5 @@
94
94
  "//": [
95
95
  "TODO: upgrade jwt-decode when moving to node 18"
96
96
  ],
97
- "version": "3.12.0-next.130"
97
+ "version": "3.12.0-next.132"
98
98
  }
@@ -80,6 +80,7 @@ export type ReplacesInfo = {
80
80
 
81
81
  export const LocusErrorCodes = {
82
82
  LOCUS_INACTIVE: 2403004,
83
+ LOCUS_USER_FULL: 2423001,
83
84
  } as const;
84
85
 
85
86
  export type LocusErrorCodes = Enum<typeof LocusErrorCodes>;
@@ -186,7 +186,7 @@ import {ReachabilityMetrics} from '../reachability/reachability.types';
186
186
  import {SetStageOptions, SetStageVideoLayout, UnsetStageVideoLayout} from './request.type';
187
187
  import {Invitee} from './type';
188
188
  import {DataSet, HashTreeMessage, Metadata} from '../hashTree/hashTreeParser';
189
- import {LocusDTO} from '../locus-info/types';
189
+ import {LocusDTO, LocusErrorCodes} from '../locus-info/types';
190
190
  import AIEnableRequest from '../aiEnableRequest';
191
191
 
192
192
  // default callback so we don't call an undefined function, but in practice it should never be used
@@ -5862,10 +5862,12 @@ export default class Meeting extends StatelessWebexPlugin {
5862
5862
 
5863
5863
  if (
5864
5864
  CallDiagnosticUtils.isSdpOfferCreationError(error) ||
5865
- CallDiagnosticUtils.isWebrtcApiNotAvailableError(error)
5865
+ CallDiagnosticUtils.isWebrtcApiNotAvailableError(error) ||
5866
+ this.isLocusUserFullError(error)
5866
5867
  ) {
5867
5868
  // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
5868
5869
  // so there is no point doing a retry
5870
+ // when the locus is full, we also don't want to retry, because it will just fail again
5869
5871
  shouldRetry = false;
5870
5872
  }
5871
5873
 
@@ -5931,7 +5933,9 @@ export default class Meeting extends StatelessWebexPlugin {
5931
5933
 
5932
5934
  this.locusInfo.suspendDestroyMeeting(false);
5933
5935
 
5934
- throw firstError ?? error;
5936
+ // LOCUS_USER_FULL is a definitive capacity error the client must surface, so it takes
5937
+ // precedence over any earlier retryable error stored in firstError.
5938
+ throw this.isLocusUserFullError(error) ? error : firstError ?? error;
5935
5939
  }
5936
5940
  }
5937
5941
 
@@ -8204,6 +8208,10 @@ export default class Meeting extends StatelessWebexPlugin {
8204
8208
  );
8205
8209
  }
8206
8210
 
8211
+ private isLocusUserFullError(error: Error | undefined): boolean {
8212
+ return (error as any)?.error?.body?.errorCode === LocusErrorCodes.LOCUS_USER_FULL;
8213
+ }
8214
+
8207
8215
  /**
8208
8216
  * Determines if the next media attempt should use only TURN-TLS (iceTransportPolicy='relay').
8209
8217
  * We do this in the hope that it will minimize the chance of Homer sending DTLS packets on a wrong
@@ -1181,6 +1181,78 @@ describe('plugin-meetings', () => {
1181
1181
  assert.calledWith(suspendDestroyMeetingStub.thirdCall, false);
1182
1182
  });
1183
1183
 
1184
+ it('should not retry if join() fails because the Locus user capacity is full', async () => {
1185
+ const error = new Error('Error Joining Meeting');
1186
+ error.error = {
1187
+ statusCode: 423,
1188
+ body: {errorCode: 2423001},
1189
+ };
1190
+ meeting.join = sinon.stub().rejects(error);
1191
+
1192
+ const thrownError = await assert.isRejected(
1193
+ meeting.joinWithMedia({joinOptions, mediaOptions})
1194
+ );
1195
+
1196
+ assert.equal(thrownError, error);
1197
+ assert.calledOnce(meeting.join);
1198
+ assert.calledOnce(generateTurnDiscoveryRequestMessageStub);
1199
+ assert.calledOnce(Metrics.sendBehavioralMetric);
1200
+ assert.calledTwice(suspendDestroyMeetingStub);
1201
+ assert.calledWith(suspendDestroyMeetingStub.firstCall, true);
1202
+ assert.calledWith(suspendDestroyMeetingStub.secondCall, false);
1203
+ });
1204
+
1205
+ it('should still retry if join() fails with another HTTP 423 Locus error', async () => {
1206
+ const error = new Error('Error Joining Meeting');
1207
+ error.error = {
1208
+ statusCode: 423,
1209
+ body: {errorCode: 2423028},
1210
+ };
1211
+ meeting.join = sinon.stub().rejects(error);
1212
+
1213
+ const thrownError = await assert.isRejected(
1214
+ meeting.joinWithMedia({joinOptions, mediaOptions})
1215
+ );
1216
+
1217
+ assert.equal(thrownError, error);
1218
+ assert.calledTwice(meeting.join);
1219
+ assert.calledTwice(generateTurnDiscoveryRequestMessageStub);
1220
+ assert.calledTwice(Metrics.sendBehavioralMetric);
1221
+ });
1222
+
1223
+ it('should throw the Locus user full error over firstError when the retry hits full capacity', async () => {
1224
+ const firstJoinError = new Error('first join error');
1225
+ const capacityError = new Error('Error Joining Meeting');
1226
+ capacityError.error = {
1227
+ statusCode: 423,
1228
+ body: {errorCode: 2423001},
1229
+ };
1230
+
1231
+ meeting.join = sinon
1232
+ .stub()
1233
+ .onFirstCall()
1234
+ .rejects(firstJoinError)
1235
+ .onSecondCall()
1236
+ .rejects(capacityError);
1237
+ meeting.locusUrl = null; // join never succeeds
1238
+
1239
+ const thrownError = await assert.isRejected(
1240
+ meeting.joinWithMedia({joinOptions, mediaOptions})
1241
+ );
1242
+
1243
+ // join() runs once for the first attempt and once for the re-join
1244
+ assert.calledTwice(meeting.join);
1245
+ // the capacity error must take precedence over the stored firstError
1246
+ assert.equal(thrownError, capacityError);
1247
+
1248
+ assert.deepEqual(meeting.joinWithMediaRetryInfo, {
1249
+ retryCount: 0,
1250
+ prevJoinResponse: undefined,
1251
+ firstError: undefined,
1252
+ prevError: undefined,
1253
+ });
1254
+ });
1255
+
1184
1256
  it('should re-join on retry when join() fails on first attempt, and throw the first error if join fails again', async () => {
1185
1257
  const firstJoinError = new Error('first join error');
1186
1258
  const secondJoinError = new Error('second join error');