@webex/internal-plugin-mercury 2.59.1 → 2.59.3-next.1

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/src/errors.js CHANGED
@@ -1,66 +1,66 @@
1
- /*!
2
- * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
- */
4
-
5
- import {Exception} from '@webex/common';
6
-
7
- /**
8
- * Exception thrown when a websocket gets closed
9
- */
10
- export class ConnectionError extends Exception {
11
- static defaultMessage = 'Failed to connect to socket';
12
-
13
- /**
14
- * @param {CloseEvent} event
15
- * @returns {string}
16
- */
17
- parse(event = {}) {
18
- Object.defineProperties(this, {
19
- code: {
20
- value: event.code,
21
- },
22
- reason: {
23
- value: event.reason,
24
- },
25
- });
26
-
27
- return event.reason;
28
- }
29
- }
30
-
31
- /**
32
- * thrown for CloseCode 4400
33
- */
34
- export class UnknownResponse extends ConnectionError {
35
- static defaultMessage =
36
- 'UnknownResponse is produced by IE when we receive a 4XXX. You probably want to treat this like a NotFound';
37
- }
38
-
39
- /**
40
- * thrown for CloseCode 4400
41
- */
42
- export class BadRequest extends ConnectionError {
43
- static defaultMessage =
44
- 'BadRequest usually implies an attempt to use service account credentials';
45
- }
46
-
47
- /**
48
- * thrown for CloseCode 4401
49
- */
50
- export class NotAuthorized extends ConnectionError {
51
- static defaultMessage = 'Please refresh your access token';
52
- }
53
-
54
- /**
55
- * thrown for CloseCode 4403
56
- */
57
- export class Forbidden extends ConnectionError {
58
- static defaultMessage = 'Forbidden usually implies these credentials are not entitled for Webex';
59
- }
60
-
61
- // /**
62
- // * thrown for CloseCode 4404
63
- // */
64
- // export class NotFound extends ConnectionError {
65
- // static defaultMessage = `Please refresh your Mercury registration (typically via a WDM refresh)`;
66
- // }
1
+ /*!
2
+ * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
+ */
4
+
5
+ import {Exception} from '@webex/common';
6
+
7
+ /**
8
+ * Exception thrown when a websocket gets closed
9
+ */
10
+ export class ConnectionError extends Exception {
11
+ static defaultMessage = 'Failed to connect to socket';
12
+
13
+ /**
14
+ * @param {CloseEvent} event
15
+ * @returns {string}
16
+ */
17
+ parse(event = {}) {
18
+ Object.defineProperties(this, {
19
+ code: {
20
+ value: event.code,
21
+ },
22
+ reason: {
23
+ value: event.reason,
24
+ },
25
+ });
26
+
27
+ return event.reason;
28
+ }
29
+ }
30
+
31
+ /**
32
+ * thrown for CloseCode 4400
33
+ */
34
+ export class UnknownResponse extends ConnectionError {
35
+ static defaultMessage =
36
+ 'UnknownResponse is produced by IE when we receive a 4XXX. You probably want to treat this like a NotFound';
37
+ }
38
+
39
+ /**
40
+ * thrown for CloseCode 4400
41
+ */
42
+ export class BadRequest extends ConnectionError {
43
+ static defaultMessage =
44
+ 'BadRequest usually implies an attempt to use service account credentials';
45
+ }
46
+
47
+ /**
48
+ * thrown for CloseCode 4401
49
+ */
50
+ export class NotAuthorized extends ConnectionError {
51
+ static defaultMessage = 'Please refresh your access token';
52
+ }
53
+
54
+ /**
55
+ * thrown for CloseCode 4403
56
+ */
57
+ export class Forbidden extends ConnectionError {
58
+ static defaultMessage = 'Forbidden usually implies these credentials are not entitled for Webex';
59
+ }
60
+
61
+ // /**
62
+ // * thrown for CloseCode 4404
63
+ // */
64
+ // export class NotFound extends ConnectionError {
65
+ // static defaultMessage = `Please refresh your Mercury registration (typically via a WDM refresh)`;
66
+ // }
package/src/index.js CHANGED
@@ -1,32 +1,32 @@
1
- /*!
2
- * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
- */
4
-
5
- import '@webex/internal-plugin-device';
6
- import '@webex/internal-plugin-feature';
7
- import '@webex/internal-plugin-metrics';
8
-
9
- import {registerInternalPlugin} from '@webex/webex-core';
10
-
11
- import Mercury from './mercury';
12
- import config from './config';
13
-
14
- registerInternalPlugin('mercury', Mercury, {
15
- config,
16
- onBeforeLogout() {
17
- return this.disconnect();
18
- },
19
- });
20
-
21
- export {default} from './mercury';
22
- export {default as Mercury} from './mercury';
23
- export {default as Socket} from './socket';
24
- export {default as config} from './config';
25
- export {
26
- BadRequest,
27
- ConnectionError,
28
- Forbidden,
29
- NotAuthorized,
30
- UnknownResponse,
31
- // NotFound
32
- } from './errors';
1
+ /*!
2
+ * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
+ */
4
+
5
+ import '@webex/internal-plugin-device';
6
+ import '@webex/internal-plugin-feature';
7
+ import '@webex/internal-plugin-metrics';
8
+
9
+ import {registerInternalPlugin} from '@webex/webex-core';
10
+
11
+ import Mercury from './mercury';
12
+ import config from './config';
13
+
14
+ registerInternalPlugin('mercury', Mercury, {
15
+ config,
16
+ onBeforeLogout() {
17
+ return this.disconnect();
18
+ },
19
+ });
20
+
21
+ export {default} from './mercury';
22
+ export {default as Mercury} from './mercury';
23
+ export {default as Socket} from './socket';
24
+ export {default as config} from './config';
25
+ export {
26
+ BadRequest,
27
+ ConnectionError,
28
+ Forbidden,
29
+ NotAuthorized,
30
+ UnknownResponse,
31
+ // NotFound
32
+ } from './errors';