♻️ include Blueprint applied with errors: in blueprint message when it fails

This commit is contained in:
Fred KISSIE
2025-10-30 02:33:45 +01:00
parent 49dffe086d
commit 8765874d9a
2 changed files with 5 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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) {