Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async getSummary(
summaryRequest: SummaryRequest
): Promise {
const layerId = summaryRequest.getLayerId();
const catalogHrn = summaryRequest.getCatalogHrn();
if (catalogHrn === undefined) {
return Promise.reject(new Error(`No catalogHrn provided`));
}
if (layerId === undefined) {
return Promise.reject(new Error(`No layerId provided`));
}
const coverageRequestBuilder = await this.getRequestBuilder(
catalogHrn
).catch(error => Promise.reject(error));
return CoverageApi.getDataCoverageSummary(coverageRequestBuilder, {
layerId
}).catch(this.errorHandler);
}