TechDocs: Reject promise if call to getBaseUrl fails

This commit is contained in:
Himanshu Mishra
2020-11-18 20:35:22 +01:00
parent 66daa47c6a
commit f8877545c5
@@ -68,11 +68,16 @@ export class LocalPublish implements PublisherBase {
reject(err);
}
this.discovery.getBaseUrl('techdocs').then(techdocsApiUrl => {
resolve({
remoteUrl: `${techdocsApiUrl}/static/docs/${entity.metadata.name}`,
this.discovery
.getBaseUrl('techdocs')
.then(techdocsApiUrl => {
resolve({
remoteUrl: `${techdocsApiUrl}/static/docs/${entity.metadata.name}`,
});
})
.catch(reason => {
reject(reason);
});
});
});
});
}