From d6ee1830543304d339583ce73f895d75f3ce8e11 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Thu, 6 May 2021 18:28:41 +0200 Subject: [PATCH] Restore for `scaffold()` Signed-off-by: Oliver Sand --- plugins/scaffolder/src/api.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/scaffolder/src/api.ts b/plugins/scaffolder/src/api.ts index a603df5fc6..c7b1594071 100644 --- a/plugins/scaffolder/src/api.ts +++ b/plugins/scaffolder/src/api.ts @@ -159,7 +159,9 @@ export class ScaffolderClient implements ScaffolderApi { }); if (response.status !== 201) { - throw ResponseError.fromResponse(response); + const status = `${response.status} ${response.statusText}`; + const body = await response.text(); + throw new Error(`Backend request failed, ${status} ${body.trim()}`); } const { id } = (await response.json()) as { id: string };