From 233b78a42ef566aa10df6b6a08397ec7dbe54682 Mon Sep 17 00:00:00 2001 From: ebarrios Date: Wed, 17 Feb 2021 12:23:16 +0100 Subject: [PATCH] Replace logging erro and return undefined for a throw new Error --- .../src/scaffolder/stages/publish/github.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts index 4de928c32b..a449eddd5d 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts @@ -64,8 +64,9 @@ export class GithubPublisher implements PublisherBase { }); if (!token) { - logger.error(`No token could be acquired for URL: ${values.storePath}`); - return { remoteUrl: '', catalogInfoUrl: undefined }; + throw new Error( + `No token could be acquired for URL: ${values.storePath}`, + ); } const client = new Octokit({