diff --git a/plugins/catalog-import/src/api/CatalogImportClient.ts b/plugins/catalog-import/src/api/CatalogImportClient.ts index b76454eb17..cecb85f9a3 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.ts @@ -177,32 +177,29 @@ the component will become available.\n\nFor more information, read an \ }): Promise<{ link: string; location: string }> { const { repositoryUrl, fileContent, title, body } = options; const parseData = YAML.parse(fileContent); - try { - const validationResponse = await this.catalogApi.validateEntity( - parseData, - `url:${repositoryUrl}`, - ); - if (!validationResponse.valid) { - throw new Error(validationResponse.errors[0].message); - } - const ghConfig = getGithubIntegrationConfig( - this.scmIntegrationsApi, - repositoryUrl, - ); - if (ghConfig) { - return await this.submitGitHubPrToRepo({ - ...ghConfig, - repositoryUrl, - fileContent, - title, - body, - }); - } - throw new Error('unimplemented!'); - } catch (err) { - throw err; + const validationResponse = await this.catalogApi.validateEntity( + parseData, + `url:${repositoryUrl}`, + ); + if (!validationResponse.valid) { + throw new Error(validationResponse.errors[0].message); } + const ghConfig = getGithubIntegrationConfig( + this.scmIntegrationsApi, + repositoryUrl, + ); + + if (ghConfig) { + return await this.submitGitHubPrToRepo({ + ...ghConfig, + repositoryUrl, + fileContent, + title, + body, + }); + } + throw new Error('unimplemented!'); } // TODO: this could be part of the catalog api diff --git a/plugins/catalog-import/src/components/StepFinishImportLocation/StepFinishImportLocation.tsx b/plugins/catalog-import/src/components/StepFinishImportLocation/StepFinishImportLocation.tsx index 38372e59ba..31bff5c697 100644 --- a/plugins/catalog-import/src/components/StepFinishImportLocation/StepFinishImportLocation.tsx +++ b/plugins/catalog-import/src/components/StepFinishImportLocation/StepFinishImportLocation.tsx @@ -76,7 +76,6 @@ export const StepFinishImportLocation = ({ prepareResult, onReset }: Props) => { Register another - ; ); }