@webex/plugin-meetings 3.12.0-next.131 → 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.
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/types.js +2 -1
- package/dist/locus-info/types.js.map +1 -1
- package/dist/meeting/index.js +13 -2
- package/dist/meeting/index.js.map +1 -1
- package/dist/types/locus-info/types.d.ts +1 -0
- package/dist/types/meeting/index.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/locus-info/types.ts +1 -0
- package/src/meeting/index.ts +11 -3
- package/test/unit/spec/meeting/index.js +72 -0
|
@@ -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
|
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
package/src/locus-info/types.ts
CHANGED
package/src/meeting/index.ts
CHANGED
|
@@ -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
|
-
|
|
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');
|