From cb68df37c520c19082ff4f43f72a1d5f31266a11 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 5 Mar 2024 11:20:36 +0100 Subject: [PATCH] chore: update code review Signed-off-by: blam --- .changeset/fresh-parrots-learn.md | 4 ++-- .../src/scaffolder/tasks/StorageTaskBroker.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.changeset/fresh-parrots-learn.md b/.changeset/fresh-parrots-learn.md index ce096f678c..69375761d7 100644 --- a/.changeset/fresh-parrots-learn.md +++ b/.changeset/fresh-parrots-learn.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-scaffolder-node': patch +'@backstage/plugin-scaffolder-node': minor --- -Update the task context type to contain the new auth initiator credentials. +Update task context type to contain the new auth initiator credentials. diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.ts index 39ab3e2bf0..a2018fe127 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.ts @@ -183,7 +183,9 @@ export class TaskManager implements TaskContext { return JSON.parse(this.task.secrets.__initiatorCredentials); } if (!this.auth) { - throw new Error('Unable to access credentials in ....'); + throw new Error( + 'Failed to create none credentials in scaffolder task. The TaskManager has not been initialized with an auth service implementation', + ); } return this.auth.getNoneCredentials(); }