diff --git a/packages/@webex/webex-core/src/lib/services-v2/services-v2.ts b/packages/@webex/webex-core/src/lib/services-v2/services-v2.ts index 56b0e6f999d..b486b0b0586 100644 --- a/packages/@webex/webex-core/src/lib/services-v2/services-v2.ts +++ b/packages/@webex/webex-core/src/lib/services-v2/services-v2.ts @@ -907,10 +907,6 @@ const Services = WebexPlugin.extend({ convertUrlToPriorityHostUrl(url = '' as string): string { const data = this.getServiceFromUrl(url); - if (!data) { - throw Error(`No service associated with url: [${url}]`); - } - return url.replace(data.defaultUrl, data.priorityUrl); }, @@ -955,6 +951,9 @@ const Services = WebexPlugin.extend({ requestObject.headers = {authorization: token}; } + // eslint-disable-next-line no-console + console.log('Fetching new service hostmap from U2C with request:', requestObject); + return this.webex.internal.newMetrics.callDiagnosticLatencies .measureLatency(() => this.request(requestObject), 'internal.get.u2c.time') .then(({body}) => this._formatReceivedHostmap(body || {})); @@ -1052,6 +1051,9 @@ const Services = WebexPlugin.extend({ // Return a resolved promise for consistent return value. return Promise.resolve(); }) + .then(() => { + this.logger.info('services: completed initializing initial service catalogs'); + }) ); }, @@ -1062,6 +1064,7 @@ const Services = WebexPlugin.extend({ * @memberof Services * @returns {Services} */ + initialize(): typeof Services { const catalog = new ServiceCatalog(); this._catalogs.set(this.webex, catalog); @@ -1100,6 +1103,7 @@ const Services = WebexPlugin.extend({ }); }, }); + /* eslint-enable no-underscore-dangle */ export default Services;