Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async fetchAndCacheResourceApiList(
hrn: string
): Promise {
const apiList = await LookupApi.resourceAPIList(this.requestBuilder, {
hrn
}).catch((err: string) =>
Promise.reject(
new Error(`Error fetching api list for HRN: "${hrn}".\n${err}`)
)
);
this.apiListCache.set(hrn, apiList as LookupApi.API[]);
return Promise.resolve(apiList as LookupApi.API[]);
}