From 8765874d9a2fd52c9e6ca0bb431c5355f0cf2b93 Mon Sep 17 00:00:00 2001 From: Fred KISSIE Date: Thu, 30 Oct 2025 02:33:45 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20include=20`Blueprint=20app?= =?UTF-8?q?lied=20with=20errors:`=20in=20blueprint=20message=20when=20it?= =?UTF-8?q?=20fails?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/lib/blueprints/applyBlueprint.ts | 2 +- server/routers/blueprints/applyYAMLBlueprint.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/lib/blueprints/applyBlueprint.ts b/server/lib/blueprints/applyBlueprint.ts index b3e58824..697e8093 100644 --- a/server/lib/blueprints/applyBlueprint.ts +++ b/server/lib/blueprints/applyBlueprint.ts @@ -141,7 +141,7 @@ export async function applyBlueprint({ blueprintMessage = "Blueprint applied successfully"; } catch (err) { blueprintSucceeded = false; - blueprintMessage = `Failed to update blueprint from config: ${err}`; + blueprintMessage = `Blueprint applied with errors: ${err}`; logger.error(blueprintMessage); error = err; } diff --git a/server/routers/blueprints/applyYAMLBlueprint.ts b/server/routers/blueprints/applyYAMLBlueprint.ts index e9895a02..21402cd0 100644 --- a/server/routers/blueprints/applyYAMLBlueprint.ts +++ b/server/routers/blueprints/applyYAMLBlueprint.ts @@ -123,7 +123,9 @@ export async function applyYAMLBlueprint( return next( createHttpError( HttpCode.INTERNAL_SERVER_ERROR, - error ? error : "An unknown error occurred while applying the blueprint" + error + ? error + : "An unknown error occurred while applying the blueprint" ) ); } @@ -132,9 +134,7 @@ export async function applyYAMLBlueprint( data: blueprint, success: true, error: false, - message: blueprint.succeeded - ? "Blueprint applied with success" - : `Blueprint applied with errors: ${blueprint.message}`, + message: "Done", status: HttpCode.CREATED }); } catch (error) {