Skip to content
12 changes: 8 additions & 4 deletions packages/@webex/webex-core/src/lib/services-v2/services-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},

Expand Down Expand Up @@ -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 || {}));
Expand Down Expand Up @@ -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');
})
);
},

Expand All @@ -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);
Expand Down Expand Up @@ -1100,6 +1103,7 @@ const Services = WebexPlugin.extend({
});
},
});

/* eslint-enable no-underscore-dangle */

export default Services;
Loading