@webex/plugin-meetings 3.12.0-next.94 → 3.12.0-next.95
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/common/errors/webex-errors.js +3 -1
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +2 -1
- package/dist/meeting/index.js.map +1 -1
- package/dist/types/common/errors/webex-errors.d.ts +2 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/common/errors/webex-errors.ts +4 -1
- package/src/meeting/index.ts +3 -1
- package/test/unit/spec/common/errors/webex-errors.ts +17 -1
- package/test/unit/spec/meeting/index.js +9 -1
|
@@ -123,7 +123,8 @@ export { AddMediaFailed };
|
|
|
123
123
|
*/
|
|
124
124
|
declare class MediaConnectionTimedOutError extends Error {
|
|
125
125
|
iceConnected: boolean;
|
|
126
|
-
|
|
126
|
+
cause?: any;
|
|
127
|
+
constructor(message: string, iceConnected: boolean, cause?: any);
|
|
127
128
|
}
|
|
128
129
|
export { MediaConnectionTimedOutError };
|
|
129
130
|
/**
|
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
|
@@ -206,10 +206,13 @@ WebExMeetingsErrors[AddMediaFailed.CODE] = AddMediaFailed;
|
|
|
206
206
|
class MediaConnectionTimedOutError extends Error {
|
|
207
207
|
iceConnected: boolean;
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
cause?: any;
|
|
210
|
+
|
|
211
|
+
constructor(message: string, iceConnected: boolean, cause?: any) {
|
|
210
212
|
super(message);
|
|
211
213
|
this.name = 'MediaConnectionTimedOutError';
|
|
212
214
|
this.iceConnected = iceConnected;
|
|
215
|
+
this.cause = cause;
|
|
213
216
|
}
|
|
214
217
|
}
|
|
215
218
|
export {MediaConnectionTimedOutError};
|
package/src/meeting/index.ts
CHANGED
|
@@ -8153,7 +8153,9 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
8153
8153
|
|
|
8154
8154
|
throw new MediaConnectionTimedOutError(
|
|
8155
8155
|
`Timed out waiting for media connection to be connected, correlationId=${this.correlationId}`,
|
|
8156
|
-
iceConnected
|
|
8156
|
+
iceConnected,
|
|
8157
|
+
// keep reference to the original rejected result (which is the object the SDK reports to CA as rawError above)
|
|
8158
|
+
error
|
|
8157
8159
|
);
|
|
8158
8160
|
}
|
|
8159
8161
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import {assert} from '@webex/test-helper-chai';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
AddMediaFailed,
|
|
4
|
+
MediaConnectionTimedOutError,
|
|
5
|
+
} from '@webex/plugin-meetings/src/common/errors/webex-errors';
|
|
3
6
|
|
|
4
7
|
describe('MediaConnectionTimedOutError', () => {
|
|
5
8
|
[
|
|
@@ -15,6 +18,19 @@ describe('MediaConnectionTimedOutError', () => {
|
|
|
15
18
|
assert.instanceOf(error, Error);
|
|
16
19
|
});
|
|
17
20
|
});
|
|
21
|
+
|
|
22
|
+
it('stores the cause when provided', () => {
|
|
23
|
+
const cause = {iceConnected: true};
|
|
24
|
+
const error = new MediaConnectionTimedOutError('timeout', true, cause);
|
|
25
|
+
|
|
26
|
+
assert.equal(error.cause, cause);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('leaves cause undefined when not provided', () => {
|
|
30
|
+
const error = new MediaConnectionTimedOutError('timeout', true);
|
|
31
|
+
|
|
32
|
+
assert.isUndefined(error.cause);
|
|
33
|
+
});
|
|
18
34
|
});
|
|
19
35
|
|
|
20
36
|
describe('AddMediaFailed', () => {
|
|
@@ -4319,7 +4319,10 @@ describe('plugin-meetings', () => {
|
|
|
4319
4319
|
sinon.stub(CallDiagnosticUtils, 'generateClientErrorCodeForIceFailure').returns(2004);
|
|
4320
4320
|
|
|
4321
4321
|
meeting.meetingState = 'ACTIVE';
|
|
4322
|
-
|
|
4322
|
+
const rejectedResult = {iceConnected};
|
|
4323
|
+
meeting.mediaProperties.waitForMediaConnectionConnected = sinon
|
|
4324
|
+
.stub()
|
|
4325
|
+
.rejects(rejectedResult);
|
|
4323
4326
|
|
|
4324
4327
|
meeting.roap.doTurnDiscovery = sinon.stub().returns({
|
|
4325
4328
|
turnServerInfo: {urls: ['turns:fake:443'], username: 'u', password: 'p'},
|
|
@@ -4342,6 +4345,11 @@ describe('plugin-meetings', () => {
|
|
|
4342
4345
|
|
|
4343
4346
|
assert.instanceOf(thrownError, AddMediaFailed);
|
|
4344
4347
|
assert.equal(thrownError.iceConnected, iceConnected);
|
|
4348
|
+
// the AddMediaFailed cause should be the MediaConnectionTimedOutError, which in turn should
|
|
4349
|
+
// preserve the original rejected result as its cause, so that the web client
|
|
4350
|
+
// can find the CA-reported error in the eventErrorCache via the cause chain
|
|
4351
|
+
assert.instanceOf(thrownError.cause, MediaConnectionTimedOutError);
|
|
4352
|
+
assert.equal(thrownError.cause.cause, rejectedResult);
|
|
4345
4353
|
});
|
|
4346
4354
|
});
|
|
4347
4355
|
|